Hi,
I have dataframe, and I want to write to csv. But when write to csv, the first column name disaaper (which is Index)
Before write,
Index c1 c2
A 2 5
B 5 9
I use below command,
when I open csv file, data look like:
how can rename the index column name? to look like my data:
I have dataframe, and I want to write to csv. But when write to csv, the first column name disaaper (which is Index)
Before write,
Index c1 c2
A 2 5
B 5 9
I use below command,
1 |
summary_table.to_csv( 'outsummary2.csv' ,index = True ,header = True ) |
1 2 3 |
c1 c2 A 2 5 B 5 9 |
1 2 3 |
Names c1 c2 A 2 5 B 5 9 |