How to transfer object dataframe in sklearn.ensemble methods

44 views Asked by At

As usual: doing first steps in Data Science. Trying to build Extra Trees REgressor model from the data frame with lists. The features DataFrame X is 47724 rows × 27 columns, each cell contains a list with 4 numbers, for example [7.69, 7.68, 7.66, 7.74]. The target Y is a series of floats. After transferring all data to regressor model, there is a mistake: setting an array element with a sequence. How to fix it?

Have tried to use advices from SKLearn ValueError: setting an array element with a sequence and to use np.array but it gives another error: 'DataFrame' object has no attribute 'tolist'. A slight difference here is that the list with the data at the beginning whether I have data frame, or I don't see the right way to use it.

0

There are 0 answers