Write single CSV file using spark-csv

前端 未结 13 2075
心在旅途
心在旅途 2020-11-22 08:43

I am using https://github.com/databricks/spark-csv , I am trying to write a single CSV, but not able to, it is making a folder.

Need a Scala function which will take

13条回答
  •  温柔的废话
    2020-11-22 09:01

    I'm using this in Python to get a single file:

    df.toPandas().to_csv("/tmp/my.csv", sep=',', header=True, index=False)
    

提交回复
热议问题