You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use decimal.Decimal as type for float values in a DataFrame.
Exporting them via to_excel() resulting in Excel cells with strings not floats. I tried xlsxwriter and openpyxl as engine.
See my MWE it seems that openpyxl itself can handle Decimal very well. The result is a real float not a string.
So the problem must somewhere in the pandas layer.
btw: Your Issue formula is to restrictive. I have no way to test the issue on the current upstream version. There are strict technical reasons for this. I haven't tested with upstream but checked the checkbox to be able to submit the Issue.
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
I use
decimal.Decimal
as type for float values in aDataFrame
.Exporting them via
to_excel()
resulting in Excel cells with strings not floats. I tried xlsxwriter and openpyxl as engine.See my MWE it seems that openpyxl itself can handle Decimal very well. The result is a real float not a string.
So the problem must somewhere in the pandas layer.
btw: Your Issue formula is to restrictive. I have no way to test the issue on the current upstream version. There are strict technical reasons for this. I haven't tested with upstream but checked the checkbox to be able to submit the Issue.
Expected Behavior
Create real float values in the Excel cells.
Installed Versions
The text was updated successfully, but these errors were encountered: