title: How to export data from a dataframe to a file databricks
body: <p>I'm doing right now Introduction to Spark course at EdX.
  Is there a possibility to save dataframes from Databricks on my computer. </p>
  
  <p>I'm asking this question, because this course provides Databricks notebooks which probably won't work after the course.</p>
  
  <p>In the notebook data is imported using command:</p>
  
  <blockquote>
    <p>log_file_path = 'dbfs:/' + os.path.join('databricks-datasets',
    'cs100', 'lab2', 'data-001', 'apache.access.log.PROJECT')</p>
  </blockquote>
  
  <p>I found this solution but it doesn't work:</p>
  
  <blockquote>
    <p>df.select('year','model').write.format('com.databricks.spark.csv').save('newcars.csv')</p>
  </blockquote>