sparksql 过滤出null值

过滤出空的值 :

 by_car_score_id.filter("type is not null")

 by_car_score_id.filter("type is null")

下面的方法试了可是不行:

df.where(df.col("type").isNull()) 
df.where(df.col("type").isNotNull())
df.filter(df.col("type").isNotNull())
df.filter(df.col("type").isNull())

猜你喜欢

转载自blog.csdn.net/mtj66/article/details/52840443