I'm trying to export a dataframe to an exisiting,formatted csv file but the dataframe keeps on getting appended in a vertical form along with additional headers which should horizontal. 

```py
A B C D E F
1 2 3 4 5 6   #=-> This is the format I have in my exisiting csv file

A B C D E F
1 2 3 4 5 6
x x x x x x   #-> This is how I want to do it

A B C D E F
1 2 3 4 5 6
A 1
B 2
C 3 
D 4  #-> This is what's currently happening

```

Any help would be much appreciated. Thank you!

```py
df.iloc[location].to_csv(path,mode='a')

```

This is the code that I've been trying with.