Skip to content

Instantly share code, notes, and snippets.

@lezorich
Created August 2, 2018 14:01
Show Gist options
  • Save lezorich/9a8b0dd147a1c00453ab8e783934b270 to your computer and use it in GitHub Desktop.
Save lezorich/9a8b0dd147a1c00453ab8e783934b270 to your computer and use it in GitHub Desktop.
Check if pandas df columns are nan or finite
for feat in features:
print("{:<30}{:>2}{:>2}".format(feat, np.any(np.isnan(df[feat])), np.all(np.isfinite(df[feat]))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment