You are writing a Spark DataFrame to a CSV file with header line on HDFS.
df.write.csv('output_folder', header=True)
Because your DataFrame is partitioned, you get multiple CSV files in your output folder. Each file will get a header with column names.
So far so good, but …