-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: join empty frame #46015
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
PERF: join empty frame #46015
Conversation
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.
do we have sufficient asv's to cover this?
pandas/core/indexes/base.py
Outdated
@@ -4544,12 +4544,22 @@ def join( | |||
|
|||
if len(other) == 0 and how in ("left", "outer"): |
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.
can you make a if len(other)
and if len(self)
clause then sub if's here for the cases
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.
Done.
Added an asv to cover 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.
lgtm ping on green
@jreback - greenish, errors look unrelated |
Could you merge in main one more time? (failures look unrelated but good to be sure) |
@mroeschke - merged main. greenish again, let me know if you think the error is related |
Thanks @lukemanley. The failure was unrelated |
* faster joins when left and/or right is empty * whatsnew * cleanup * add asv for joining with empty frame * asv
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Similar to #45838, but for
DataFrame.join
.DataFrame.join
already had a fast path for joining with an empty frame but it only covered a limited set of cases. This PR makes the fast path a bit faster and covers additional cases.