Answers for "pyspark filter isNotNull"

0

pyspark filter isNotNull

>>> from pyspark.sql import Row
>>> df = spark.createDataFrame([Row(name='Tom', height=80), Row(name='Alice', height=None)])
>>> df.filter(df.height.isNotNull()).collect()
[Row(name='Tom', height=80)]
Posted by: Guest on September-02-2021

Browse Popular Code Answers by Language