Note
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang mag-sign in o magpalit ng mga direktoryo.
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang baguhin ang mga direktoryo.
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.databricks.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.databricks.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|
+----+----+-----------+-----------+