Skip to content

Clarify dtype parameter in read_excel #55757

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

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Conversation

gadeatric
Copy link
Contributor

Fix #55489

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@mroeschke mroeschke added this to the 2.2 milestone Oct 30, 2023
@mroeschke mroeschke added Docs IO Excel read_excel, to_excel labels Oct 30, 2023
@mroeschke mroeschke merged commit a4aa699 into pandas-dev:main Oct 30, 2023
@mroeschke
Copy link
Member

Thanks @gadeatric

Comment on lines -158 to +162
Use `object` to preserve data as stored in Excel and not interpret dtype.
Use `object` to preserve data as stored in Excel and not interpret dtype,
which will necessarily result in `object` dtype.
If converters are specified, they will be applied INSTEAD
of dtype conversion.
If you use `None`, it will infer the dtype of each column based on the data.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal, especially because the issue existed prior to this PR, but I think we should be using double backticks here. The docstrings use RST format, not markdown, and so this renders as italics rather than code highlighting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! I've sent a PR with the double backticks. Let me know if I can help with anything else!

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

Successfully merging this pull request may close these issues.

BUG: pandas.read_excel() with dtype=object is broken in pandas 2.1.1
3 participants