您可以使用
DataFrame.na.fill ()
在Scala中,方法DataFrame.fillna ()
方法在Python中。
下麵是相關鏈接:
Scala:
https://spark.apache.org/docs/latest/api/scala/index.html org.apache.spark.sql.DataFrame
https://spark.apache.org/docs/latest/api/scala/index.html org.apache.spark.sql.DataFrameNaFunctions
Python:
http://spark.apache.org/docs/latest/api/python/pyspark.sql.html pyspark.sql.DataFrame.fillna