I have set columns from B to F like below:
with pd.ExcelWriter(r'C:\Users\Personal\output.xlsx') as writer:
df.to_excel(writer, sheet_name='IBM_DATA', index=False)
# below code use for column formatting
wb = writer.book # get workbook
ws = writer.sheets['IBM_DATA'] # and worksheet
# add a new format then apply it on right columns
currency_fmt = wb.add_format({'num_format': '0.0000'})
for col in range(1,5):
ws.set_column(col,col,15, currency_fmt)