-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Default to coalesce=False
in left outer join
#13441
Comments
I think we should instead have a separate parameter called In joining, the only time any of this matters is a left/right/outer join, in which the key on one side has no corresponding key on the other. This could all be captured by a single boolean column that indicates whether a join was successful or not (or an enum that says 'Left'/'Right'/'Both' to indicate which frame the value came from). But barring that, the only reason to distinguish between whether the value came from the left or right frame is when one is null and the other isn't. The non-coalesce situation to me feels very redundant. If you have many columns, they're going to look like this (say we have a left join)
In other words, all of our |
@mcrumiller A couple counter examples.
|
For your second example (I assume we're no longer talking about an asof-join), I think my example still does apply. Column |
I am opposed to a |
Is the plan to do this in some |
@s-banach it's currently milestoned for 1.0 |
We want to pick this up for 1.0. The current blocker is that we do not support left outer non-coalesce join in the streaming engine. |
coalesce=False
in left outer join
This will be deprecated in 0.20.x, and broken with the 1.0.0 release. I'll pick up the deprecation. |
Description
Background
In #12963 it was decided that, in outer joins, columns wouldn't be coalesced - instead, both should be kept
Shouldn't the same be done for left joins?
If the names don't overlap, this is what pandas does:
If the names do overlap, pandas only keeps a single column:
Request
In light of the linked PR, I think I'd have expected:
and
and for the current behaviour to be given by
how='left_coalesce'
The text was updated successfully, but these errors were encountered: