Skip to content

Instantly share code, notes, and snippets.

@mzaradzki
Last active July 3, 2017 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzaradzki/d6bb3fad37afae4d47dd845b1eaed941 to your computer and use it in GitHub Desktop.
Save mzaradzki/d6bb3fad37afae4d47dd845b1eaed941 to your computer and use it in GitHub Desktop.
for col, tp in nullcols:
if (tp == bool):
dfX.loc[dfX[col]==True, col] = 'TRUE'
dfX.loc[dfX[col]==False, col] = 'FALSE'
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