-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
ENH: Add left_semi merge #62961
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
base: main
Are you sure you want to change the base?
ENH: Add left_semi merge #62961
Conversation
pandas/core/frame.py
Outdated
| * inner: use intersection of keys from both frames, similar to a SQL inner | ||
| join; preserve the order of the left keys. | ||
| * left_semi: Filter for rows in the left that have a match on the right; | ||
| preserve the order of the left keys. |
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.
These sound really similar. I think the difference is that if a key appears more than once on the left, then only one match is returned. Secondly, no columns from the right are returned. Did I get that right? If so, I think you may want to say more here.
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.
This is modeled after what a database semi join does. I can refer to that but I really don’t want to get too deep into the semantics here since there is a standard out there that defines this
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.
added
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'll let others do a code review
doc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.Reviving an old PR of mine