Remove bold formatting on Dataframe index

Viewed 1077

I have a dataframe as below, with date as Index

Date           Count
01/01/2020       10
02/01/2020       14
03/01/2020        7

When writing the dataframe to excel, the index is always in bold. how do I remove the bold formatting on the index?

1 Answers

You can use trick - convert index to column and then not write index to file like:

df.reset_index().to_excel(file, index=False)
Related