<human>:  how to export a table dataframe in pyspark to csv?
<bot>: Here is some code to write DataFrame `df` to csv file 'mycsv.csv'

df.write.csv('mycsv.csv')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.