when i write an empty data frame with options ("header","true") but it does not write any header on the CSV file how to resolve ?
1 Answer
You can't do this with Spark 2.x and there is no workaround, so you will have to create the file manually. It will work from 3.0 onwards though. Here is the ticket: https://issues.apache.org/jira/browse/SPARK-26208