-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: boolean indexing using .iloc #20627 #34622
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
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
def test_iloc_with_boolean_operation(): | ||
# GH 20627 | ||
result = DataFrame([[0, 1], [2, 3], [4, 5], [6, np.nan]]) | ||
result.iloc[result.index <= 2] *= 2 |
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.
you need to copy result each time you are using 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.
Are you sure ? result
is modified inplace ? (or I don't understand)
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 get it. for each part of the test you want to reconstruct result, so that the in place mods only affect 1 part and are not consecutive.
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.
comment & pls ping on green.
I think everything is done. The last PR is green. |
Thanks @OlivierLuG |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
A simple test was added to close this issue.