-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: Various inconsistencies in DataFrame getitem/setitem behavior (fixes #2765) #2766
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
BUG: Various inconsistencies in DataFrame getitem/setitem behavior (fixes #2765) #2766
Conversation
Last time I tumbled down the spaghetti stack of So, just a hunch, but did you check for perf regressions for this vs. master? |
ok, will take a look |
… behavior (minor performance tweak)
ok, only one test consistently affected: after a tweak, things are good now (test_perf.sh gives ratios that look basically normally distributed around 1.0, with no single test consistently doing worse across multiple runs) |
ok, good. If you're changing behaviour of |
yeah, already added test coverage |
Sorry, I missed that when looking. |
found a leftover print statement in my test code...decided to consolidated the merges and made a new PR at #2776 rather than spamming the commit log |
Github allows you to do a forced push to the PR branch, in which case, the current state of the branch |
Ahh, wasn't sure if Github handled non-ff pushes to PR branches well. What does the PR show on the website when you do that? I guess I'll find out next time. |
It throws away the old commits and shows just the new state of the branch. |
ok, good to know |
see #2765
Note, to address " getitem does not reindex boolean Series key but setitem does ", I have changed the getitem behavior rather than the setitem behavior because it is more consistent with other indexing behavior and does not break any tests...just in case, I have inserted a warning about this happening (which only triggers when a reindex is actually required)
Also, in addition to resolving the bugs, I have refactored the code to make getitem and setitem code paths as symmetric as possible, in order to help prevent more issues in the future.