export a table dataframe `df` in pyspark to csv 'mycsv.csv',df.toPandas().to_csv('mycsv.csv')