Skip to content
Advertisement

TypeError during resampling

I am trying to apply resampling for my dataset which has unbalanced classes. What I have done is the following:

JavaScript

Unfortunately, I am having some problems at this step: X = pd.concat([X_train, y_train], axis=1), i.e.

JavaScript

You can think of Text column as

JavaScript

I hope you can help me to handle with it.

Advertisement

Answer

You have to convert X_train to a Dataframe before use concat

JavaScript
Advertisement