I\'m trying to filter a PySpark dataframe that has None as a row value:
df.select(\'dt_mvmt\').distinct().collect()
[Row(dt_mvmt=u\'2016-03-27\
If you want to filter out records having None value in column then see below example:
df=spark.createDataFrame([[123,"abc"],[234,"fre"],[345,None]],["a","b"])
Now filter out null value records:
df=df.filter(df.b.isNotNull())
df.show()
If you want to remove those records from DF then see below:
df1=df.na.drop(subset=['b'])
df1.show()