Last active
July 3, 2017 10:20
-
-
Save mzaradzki/e530f682415d1032e5c63a620516a0d3 to your computer and use it in GitHub Desktop.
Handling of Null values for categorical and boolean columns in Pandas dataframes
This file contains 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 col, tp in nullcols: | |
if (tp == str): | |
dfX.loc[dfX[col].isnull(), col] = 'MISSING' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment