【发布时间】:2021-12-20 16:18:41
【问题描述】:
我有一个看起来像这样的 pyspark 函数。 \
spark.sql("select count(*) from student_table where student_id is NULL") \
spark.sql("select count(*) from student_table where student_scores is NULL") \
spark.sql("select count(*) from student_table where student_health is NULL")
我得到的结果看起来像 \
+-------+|count(1)|\n-------+| 0|+-------+\n|count(1)|\n-------+| 100|+-------+\n|count(1)|\n-------+| 24145|
我想要做的是使用 pandas 或 pyspark 函数将结果变成每列的数据框。
结果应该具有每列的每个空值结果。
例如,
如果有人可以帮助我,请提前感谢。
【问题讨论】:
标签: pandas apache-spark pyspark apache-spark-sql