Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Fix to_excel storing decimals as strings instead of numbers (issue #49598) #60230

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

michiel-de-muynck
Copy link
Contributor

This is the same bug fix code as PR #50174, which went stale and had no tests. The author of that PR is no longer responding. This PR adds tests and release notes.

Sorry, something went wrong.

@michiel-de-muynck michiel-de-muynck changed the title BUG: Fix to_excel storing decimals as strings insteae of numbers (issue #49598) BUG: Fix to_excel storing decimals as strings instead of numbers (issue #49598) Nov 7, 2024
@mroeschke mroeschke added the IO Excel read_excel, to_excel label Nov 7, 2024
@mroeschke mroeschke added this to the 3.0 milestone Nov 7, 2024
@mroeschke mroeschke merged commit feaa963 into pandas-dev:main Nov 7, 2024
54 checks passed
@mroeschke
Copy link
Member

Thanks @michiel-de-muynck

@LorenzoMorelli
Copy link

LorenzoMorelli commented Dec 11, 2024

Hi, thanks for your work!
When I export a dataframe to my PostgreSQL database with to_sql(...) using if_exists='replace', decimal.Decimal values are stored as TEXT instead of DECIMAL. Does this patch also fix this issue?

@michiel-de-muynck
Copy link
Contributor Author

Hi Lorenzo, this only affects Excel, not PostgreSQL.

@asishm
Copy link
Contributor

asishm commented Dec 18, 2024

@mroeschke this is milestoned 3.0 but the whatsnew entry is in 2.3. does that need to be addressed (or backported)?

@mroeschke
Copy link
Member

Oops the whatsnew entry should be moved to v3.0.0.rst. Could you open another PR to do that @michiel-de-muynck?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Excel read_excel, to_excel
Projects
None yet
4 participants