Skip to content

Instantly share code, notes, and snippets.

@sanjurm16
Created January 20, 2019 23:44
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 sanjurm16/029c29b55bb456fb8e354aad3ef78d3c to your computer and use it in GitHub Desktop.
Save sanjurm16/029c29b55bb456fb8e354aad3ef78d3c to your computer and use it in GitHub Desktop.
from pyspark.sql.functions import isnan, when, count, col
train_df.select([count(when(isnan(c), c)).alias(c) for c in train_df.columns]).show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment