I am new to pandas. Here is my short description of dataset:
When I am doing my df.info():
datasets=dataset.apply(pd.to_numeric,errors='coerce')
print(dataset.info())
<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 2192 entries, 2012-01-01 to 2017-12-31
Data columns (total 15 columns):
Temp_min 2192 non-null int64
Temp_max 2192 non-null int64
Temp_mean 2192 non-null float64
humidity 2192 non-null int64
wind 2192 non-null int64
Rain 2191 non-null float64
Latitude (*N) 2192 non-null float64
Daytime_hour % 2192 non-null float64
Soil 0 non-null float64
Stage 0 non-null float64
Kc 2182 non-null float64
ETo 2192 non-null float64
ETcrop(mm/day) 2182 non-null float64
PERC(mm/day) 2192 non-null int64
Irrigation Requirement (mm/day) 2182 non-null float64
dtypes: float64(10), int64(5)
memory usage: 274.0 KB
None
But during running time:
evaluate_model(train, test, n_input);
I am getting error:
ValueError: could not convert string to float: 'Clay'
Please suggest me how to overcome this problem. Should I store "Clay" as some integer number like "0", "Sandy" as "1" to overcome above problem. If so, what string values not stored in dataset?. Please clarify my problem with any suitable approach. Thanks!!