When I used to run this code I have this error. I have tried to solve it by others method but they are not sophisticated. The dataset looks like this:
[
]
And my code:
from sklearn.ensemble import RandomForestRegressor
regressor = RandomForestRegressor(n_estimators = 10, random_state = 0)
regressor.fit(df_train, y_train)
Error trace:
File "C:\Users\Acer 15\Anaconda3\lib\site-packages\sklearn\utils\validation.py", line 433, in check_array array = np.array(array, dtype=dtype, order=order, copy=copy) ValueError: could not convert string to float: '15ML'
15MLbeing a string with numeric as well as string characters not been able to be converted tofloat. You need to process the data-set to make it work. Is your data-set in DB? or pandas dataframe? - Bussller