SciKit-Learn Label Encoder resulting in error 'argument must be a string or number'
问题 I'm a bit confused - creating an ML model here. I'm at the step where I'm trying to take categorical features from a "large" dataframe (180 columns) and one-hot them so that I can find the correlation between the features and select the "best" features. Here is my code: # import labelencoder from sklearn.preprocessing import LabelEncoder # instantiate labelencoder object le = LabelEncoder() # apply le on categorical feature columns df = df.apply(lambda col: le.fit_transform(col)) df.head(10)