pyspark 筛选 null 行

如果某行数值是null,去掉这行,比如

代码:

df = df.filter(df.x2. isNotNull())
+---+----+----+
| x1|  x2| x3 |
+---+----+----+
|  a|   b|null|
|  1|null|  0 |
|  2|   2|  3 |
+---+----+----+


#去掉之后
+---+----+----+
| x1|  x2| x3 |
+---+----+----+
|  a|   b|null|
|  2|   2|  3 |
+---+----+----+

ref:https://stackoverflow.com/questions/44163153/how-to-drop-rows-with-nulls-in-one-column-pyspark 

你可能感兴趣的:(大数据,pyspark)