-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Add xlsb auto detection to read_excel and respect default options #38710
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
Conversation
…prove-auto-inference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. The behavior of respecting io.excel.{ext}.reader
needs tests, including a test for the error message when it is set to a nonexistent engine.
Hello @lithomas1! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-01-01 21:48:02 UTC |
FYI @rhshadrach, I'm going to be changing the behavior in this PR if both xlrd and openpyxl aren't installed. This way, we encourage users to use openpyxl not xlrd. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks @lithomas1!
is there a test for this #34252, e.g. that the set option works correctly? (i see one added for an invalid value), and am pretty sure we are testing this, but just want to confirm. |
@jreback, |
@lithomas1 |
Ack - my previous comment was incorrect. That is of course only for which engine is passed to read_excel. |
thanks @lithomas1 very nice! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Note: Even though most of the reader options for read_excel only have 1 option, I think it is still useful to respect pandas.set_option.
Also, if some people have older xlrd(e.g. 1.2.0) and don't have openpyxl, they can use options to force pandas to read xlsx files with xlrd. (this is possible now, but xlrd's maintainer has made it clear he doesn't support for things like this)