title: Spark dataframe save in single file on hdfs location
body: <p>I have dataframe and i want to save in single file on hdfs location.</p>
  
  <p>i found the solution here <a href="https://stackoverflow.com/questions/31674530/write-single-csv-file-using-spark-csv">Write single CSV file using spark-csv</a></p>
  
  <pre><code>df.coalesce(1)
      .write.format("com.databricks.spark.csv")
      .option("header", "true")
      .save("mydata.csv")
  </code></pre>
  
  <p>But all data will be written to mydata.csv/part-00000 and i wanted to be mydata.csv file.</p>
  
  <p>is that possible?</p>
  
  <p>any help appreciate </p>