Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
An expression that returns true if the column is null. Supports Spark Connect.
For the corresponding Databricks SQL function, see isnull function.
Syntax
from pyspark.sql import functions as dbf
dbf.isnull(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
Target column to compute on. |
Returns
pyspark.sql.Column: True if value is null and False otherwise.
Examples
from pyspark.sql import functions as dbf
df = spark.createDataFrame([(1, None), (None, 2)], ("a", "b"))
df.select("*", dbf.isnull("a"), dbf.isnull(df.b)).show()
+----+----+-----------+-----------+
| a| b|(a IS NULL)|(b IS NULL)|
+----+----+-----------+-----------+
| 1|NULL| false| true|
|NULL| 2| true| false|
+----+----+-----------+-----------+