write dataframe `df` to csv file 'mycsv.csv',df.write.csv('mycsv.csv')