检查列值是否不为 null。
Syntax
isNotNull()
退货
列(布尔值)
示例
from pyspark.sql import Row
df = spark.createDataFrame([Row(name='Tom', height=80), Row(name='Alice', height=None)])
df.filter(df.height.isNotNull()).collect()
# [Row(name='Tom', height=80)]
检查列值是否不为 null。
isNotNull()
列(布尔值)
from pyspark.sql import Row
df = spark.createDataFrame([Row(name='Tom', height=80), Row(name='Alice', height=None)])
df.filter(df.height.isNotNull()).collect()
# [Row(name='Tom', height=80)]