I have a spark dataframe (hereafter spark_df
) and I'd like to convert that to .csv
format. I tried two following methods:
spark_df_cut.write.csv('/my_location/my_file.csv')
spark_df_cut.repartition(1).write.csv("/my_location/my_file.csv", sep=',')
where I get no error message for any of them and both get completed [it seems], but I cannot find any output .csv
file in the target location! Any suggestion?
I'm on a cloud-based Jupyternotebook using spark '2.3.1'.