Aller au contenu principal

isNull

Vérifiez si la valeur de la colonne est nulle.

Syntaxe

Python
isNull()

Renvoie

Colonne (booléen)

Exemples

Python
from pyspark.sql import Row
df = spark.createDataFrame([Row(name='Tom', height=80), Row(name='Alice', height=None)])
df.filter(df.height.isNull()).collect()
Output
# [Row(name='Alice', height=None)]