Command
df.write.format("csv").save("path")Explanation
Save DataFrame to CSV, Parquet, etc.
Examples
Save DataFrame as parquet
df.write.mode("overwrite").parquet("output.parquet")df.write.format("csv").save("path")Save DataFrame to CSV, Parquet, etc.
Save DataFrame as parquet
df.write.mode("overwrite").parquet("output.parquet")