-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Allow multiple 'by' parameters in merge_asof() when DataFrames are indexed (#15676) #15679
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
Codecov Report
@@ Coverage Diff @@
## master #15679 +/- ##
==========================================
- Coverage 91.03% 91% -0.03%
==========================================
Files 143 143
Lines 49392 49399 +7
==========================================
- Hits 44962 44958 -4
- Misses 4430 4441 +11
Continue to review full report at Codecov.
|
@@ -1264,13 +1264,21 @@ def flip(xs): | |||
|
|||
# a "by" parameter requires special handling | |||
if self.left_by is not None: |
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.
is this also changed for right_by
? any way to make this a touch more DRY. (don't spend a lot of time as this is pretty complicated, but any simplification would be great).
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 guess I could leave a comment since it also affects the new line 1276. Basically, the left and right "by" parameters have to be the same length. (I should also add verification of this starting at line 1157.) Because they are the same length, checking for one means I can assume the other. That's why I only bother with a left conditional.
lgtm. ping on green. |
@jreback It's all green! |
thanks @chrisaycock very nice! |
…re indexed (pandas-dev#15676) closes pandas-dev#15676 Author: Christopher C. Aycock <[email protected]> Closes pandas-dev#15679 from chrisaycock/GH15676 and squashes the following commits: 965caf2 [Christopher C. Aycock] Verify that 'by' parameters are the same length 4a2cc09 [Christopher C. Aycock] BUG: Allow multiple 'by' parameters in merge_asof() when DataFrames are indexed (pandas-dev#15676)
…re indexed (pandas-dev#15676) closes pandas-dev#15676 Author: Christopher C. Aycock <[email protected]> Closes pandas-dev#15679 from chrisaycock/GH15676 and squashes the following commits: 965caf2 [Christopher C. Aycock] Verify that 'by' parameters are the same length 4a2cc09 [Christopher C. Aycock] BUG: Allow multiple 'by' parameters in merge_asof() when DataFrames are indexed (pandas-dev#15676)
git diff upstream/master | flake8 --diff