Skip to content

Instantly share code, notes, and snippets.

@okdolly-001
Created March 17, 2018 06:47
Show Gist options
  • Save okdolly-001/11faa3fe381665f37b7714bc2eab36c2 to your computer and use it in GitHub Desktop.
Save okdolly-001/11faa3fe381665f37b7714bc2eab36c2 to your computer and use it in GitHub Desktop.
Binarize integer in a pandas dataframe #pandas
y_train['loss'] = (y_train['loss'] > 0.0).astype(int)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment