Last active
November 15, 2020 11:19
-
-
Save vineethm1627/9d3aa935f99bd19c752fd76605e435b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.preprocessing import LabelEncoder | |
le = LabelEncoder() | |
data[category_cols] = data[category_cols].apply(le.fit_transform) | |
data.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment