I am trying to write Dataframe to csv :
for i in range 10:
consolidated_df.to_csv(output_file_path + '/' + dest_csv,mode='a',index=False)
This is creating adding headers as new rows for every iteration
col1 col2 col3
a b c
col1 col2 col3
d e f
col col2 col3
g h i
if i use header=none in df.to_csv , then the csv doesnt have any headers at all
all i need is this
col1 col2 col3
a b c
d e f
g h i