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