How to apply the format I got with Options.display in my output

Hello,

I’m new in coding and just started in Python, I recently started a project to import a file from another department where I need to reshape a breakdown and reformat the data.
I discovered by using this line of code below:

pd.options.display.float_format = ‘{:,.0f}’.format

On the format numbers, the result is exactly what I want on the display as below

                         Actual 2020  ...  CY Budget Vs CY Actual

Nature of Expenses …
Depreciation -995,426 … 95,477
IT Consumables -184,770 … 78,327

but I did not succeed to have the same result in my output when I run it:
df1.to_excel(output_workbook, index=True)

Nature of Expenses Actual 2020 Actual 2021
Depreciation -995426.05 -1005519.02
IT Consumables -184770.38 -249322.29

below the code:

import pandas as pd
import numpy as np

initial_workbook = ‘C:/Users/ut2p37/Desktop/GIT Commentary April 22.xlsx’
info_workbook = ‘C:/Users/ut2p37/Desktop/Nature of Expenses.xlsx’
output_workbook = ‘C:/Users/ut2p37/Desktop/Test2.xlsx’

df_initial = pd.read_excel(initial_workbook)
df_info = pd.read_excel(info_workbook)

df_initial.rename(columns={‘Code’: ‘Essbase Code’}, inplace=True)
df1 = pd.merge(df_initial, df_info[[‘Essbase Code’, ‘Nature of Expenses’]], on=‘Essbase Code’, how=‘inner’)

df1 = df1.replace(np.nan, ’ ', regex=True)

df1 = df1.groupby([‘Nature of Expenses’]).sum()

df1 = df1.filter(items=[‘Actual 2020’, ‘Actual 2021’, ‘Actual 2022’, ‘Budget 2022’, ‘CY Budget Vs CY Actual’])
df1 = df1.filter(regex=’.*[^_TBD]$’, axis=0)

#df1 = df1.round(0)
pd.options.display.float_format = ‘{:,.0f}’.format

#print(df1.index)
#print(df1.columns)
#print(df1.dtypes)
print(df1)

df1.to_excel(output_workbook, index=True)