ısnull

Sütun null olduğunda true döndüren ifade. Spark Connect'i destekler.

İlgili Databricks SQL fonksiyonu için bakınız isnull fonksiyonu.

Sözdizimi

from pyspark.sql import functions as dbf

dbf.isnull(col=<col>)

Parametreler

Parametre Türü Description
col pyspark.sql.Column veya str Hesap için hedef sütun.

İade

pyspark.sql.Column: Değer null ise true ve aksi halde False olur.

Örnekler

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|
+----+----+-----------+-----------+