Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Label encode and hot encode categorical columns
- from sklearn.preprocessing import LabelEncoder
- le = LabelEncoder()
- X_categorical = X_categorical.apply(LabelEncoder().fit_transform)
- X_to_predict_categorical = X_to_predict_categorical.apply(LabelEncoder().fit_transform)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement