isNaN
Check if the column value is NaN.
Syntax
Python
isNaN()
Returns
Column (boolean)
Examples
Python
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()
Output
# [Row(name='Alice', height=nan)]