Label encoding across multiple columns in scikit-learn

后端 未结 22 2279
礼貌的吻别
礼貌的吻别 2020-11-22 09:02

I\'m trying to use scikit-learn\'s LabelEncoder to encode a pandas DataFrame of string labels. As the dataframe has many (50+) columns, I want to a

22条回答
  •  一整个雨季
    2020-11-22 09:25

    The problem is the shape of the data (pd dataframe) you are passing to the fit function. You've got to pass 1d list.

提交回复
热议问题