如何将数据帧转换为spark中的csv,读作
dataFrame = spark.read.csv("testData2.csv",header='true')
答案 0 :(得分:1)
您尚未提及Spark版本。以下是选项
Spark 1.4 +
dataFrame.write.format('com.databricks.spark.csv').save('testdata.csv')
Spark 2.0 +
dataFrame.write.csv('testdata.csv')