how to do label encoding in multiple column at once

Solutions on MaxInterview for how to do label encoding in multiple column at once by the best coders in the world

showing results for - "how to do label encoding in multiple column at once"
Daniele
06 Jun 2018
1# We can use label encoding on multiple column at once by using method
2from sklearn.preprocessing import LabelEncoder
3df[cat_c] = df[cat_c].apply(LabelEncoder().fit_transform)