-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
REG: read_excel with engine specified raises on non-path/non-buffer #39586
Conversation
rhshadrach
commented
Feb 3, 2021
- closes BUG: read_excel with Workbook and engine="openpyxl" raises ValueError #39528
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
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.
looks good to me! |
filename = datapath("io", "data", "excel", "test1" + ext) | ||
wb = openpyxl.load_workbook(filename) | ||
result = pd.read_excel(wb, engine="openpyxl") | ||
expected = pd.read_excel(filename) |
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.
It cannot hurt to call wb.close()
before tm.assert_frame_equal
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.
Thanks @twoertwein, added.
if you can merge master and ping on greem |
…enpyxl_workbook � Conflicts: � doc/source/whatsnew/v1.2.2.rst � pandas/tests/io/excel/test_openpyxl.py
This PR enables the possibility that the sheet in The method I've added tests for this and to ensure the fix from #39486 works on non-read-only workbooks. |
@jreback - green |
thanks @rhshadrach |
@meeseeksdev backport 1.2.x |
This comment has been minimized.
This comment has been minimized.
@rhshadrach There have been some changes to master since 1.2 that were not backported (#38710 and #39008) and trying to apply these changes, I'm getting
|
ahh , needed a |
…aises on non-path/non-buffer
…on-path/non-buffer (#39652) Co-authored-by: Richard Shadrach <[email protected]>