Answers for "how to do label encoding in multiple column at once"

0

how to do label encoding in multiple column at once

# We can use label encoding on multiple column at once by using method
from sklearn.preprocessing import LabelEncoder
df[cat_c] = df[cat_c].apply(LabelEncoder().fit_transform)
Posted by: Guest on August-09-2021

Code answers related to "how to do label encoding in multiple column at once"

Python Answers by Framework

Browse Popular Code Answers by Language