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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pandas/io/excel/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,11 @@
Returns a subset of the columns according to behavior above.
dtype : Type name or dict of column -> type, default None
Data type for data or columns. E.g. {{'a': np.float64, 'b': np.int32}}
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.
Comment on lines -158 to +162
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!

engine : str, default None
If io is not a buffer or path, this must be set to identify io.
Supported engines: "xlrd", "openpyxl", "odf", "pyxlsb", "calamine".
Expand Down