-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: fix skiprows callable infinite loop #45586
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
I'm not sure why that "Test experimental data manager" test fails; it doesn't appear to be related to my code. EDIT: Also I cannot run this test locally; it requires |
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.
Small comments
please add a whatsnew
Is the |
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
doc/source/whatsnew/v1.5.0.rst
Outdated
@@ -227,6 +227,7 @@ MultiIndex | |||
I/O | |||
^^^ | |||
- Bug in :meth:`DataFrame.to_stata` where no error is raised if the :class:`DataFrame` contains ``-np.inf`` (:issue:`45350`) | |||
- Bug in :meth:`read_excel` with `engine=python` results in an infinite loop with certain `skiprows` callables (:issue:`45585`) |
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.
What does engine=python mean? I do not think that python is valid. Please also add ticks around the string, e.g. engine="python"
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.
I'm not sure it was suggested here #45586 (comment)
I've just removed it.
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.
Please let the reviewer resolve conversations
I think I get what jeff meant. read_csv with engine="python" and read_excel
.
Please also add a test for read_csv
@phofl @rhshadrach ok here? |
Tests are failing.
are open points |
The merge of main seems to have broken something, I can no longer run my test...
|
You have to build pandas again |
I've added a similar test for csv... it passes but it doesn't appear to go through my new code anyway. Does it still make sense to mention |
No, don't have to mention in this case pre-commit is failing |
precommit is failing with the following, but I'm not sure why as I've copied the form of the other notes in the file.
|
:func: pre-commit is failing because of Edit: Two backticks before and after skiprows |
You have to add
I struggled with this before. In GitHub (and maybe elsewhere?), you can use two different number of backticks to make backticks show up, e.g. |
@bram2000 can you merge master and address comments |
I've merged master. Even if i manually add |
Ah, I see - yes, I'm seeing the same. However doesn't the same bug exist in L691 down below? |
No it doesn't seem to. I've tried various combinations of skiprow functions and I can't get it to fail. |
@bram2000 - thanks for checking! Sorry for my confusion, it all makes sense now. |
@bram2000 - failure look unrelated. Can you merge main. |
Thanks @bram2000 |
* BUG: fix skiprows callable infinite loop * BUG: seperate new test * add whatsnew entry * make note user-centric * add engine * move note to IO section * modify comment * add test for csv * lint * formatting * fix whatsnew * test not valid for pyxlsb Co-authored-by: Jeff Reback <[email protected]>
* BUG: fix skiprows callable infinite loop * BUG: seperate new test * add whatsnew entry * make note user-centric * add engine * move note to IO section * modify comment * add test for csv * lint * formatting * fix whatsnew * test not valid for pyxlsb Co-authored-by: Jeff Reback <[email protected]>
Not sure what to do about the
whatsnew
entry. Please advise (I've read the contributing doc but could not find it mentioned).