Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Handling of Null values for categorical and boolean columns in Pandas dataframes
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