Creating a dataframe of float. Here's what pandas outputs:
print(hh.iloc[2][Number])
>>1028112000000713.0
And that 's what excel outputs:
1028112000000710
Output code to excel:
xl = pd.ExcelWriter('gg.xlsx', engine='xlsxwriter')
df.to_excel(
xl,
sheet_name='ww',
index=False)
I tried that:
wb = xl.book
ws = xl.sheets['ww']
form = wb.add_format()
form.set_num_format('################')
ws.set_column('D:D', 18, form)
But it didn't work
Why does excel round numbers? How to fix it?