Created
December 28, 2018 16:14
-
-
Save redpoint13/5e1568bc0586abc33764a2d485fcd9a8 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
for c in cols_cat: | |
df = pd.concat([df, pd.get_dummies(df[c], prefix=c,dummy_na=True)], axis=1).drop([c], axis=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment