pyspark.sql.Column.isNaN#

Column.isNaN()[source]#

True if the current expression is NaN.

New in version 4.0.0.

Examples

>>> from pyspark.sql import Row
>>> df = spark.createDataFrame(
...     [Row(name='Tom', height=80.0), Row(name='Alice', height=float('nan'))])
>>> df.filter(df.height.isNaN()).collect()
[Row(name='Alice', height=nan)]