Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Get percentage of missing values pyspark all columns

amount_missing_df = df.select([(count(when(isnan(c) | col(c).isNull(), c))/count(lit(1))).alias(c) for c in df.columns])
amount_missing_df.show()
 
PREVIOUS NEXT
Tagged: #Get #percentage #missing #values #pyspark #columns
ADD COMMENT
Topic
Name
5+5 =