-
-
Notifications
You must be signed in to change notification settings - Fork 18.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
BUG: Index.join with different names doesn't return None name #57074
Conversation
I think this introduces an inconsistency between the non-unique and monotonic join paths. xref #55815 where @rhshadrach and I tried to determine the intended behavior. When left/right names differ, the choices seem to be:
As of 2.2.0 I think there are cases of 1 and 3 occuring in various places. #56948 attempted to implement case 3 consistently but maybe it should be case 1 as you're doing in this PR. |
Thanks for the reference @lukemanley For I slightly prefer the return None approach as it's already being done in arithmetic cases and appears simpler, but not sure if there's a use case where joins specifically should keep names. |
Are we meaning to have different rules for Index vs Series?
I can't say I've ever directly used |
Keeping consistency with implicit alignment (e.g. arithmetic cases) seems reasonable to me. |
OK with merging here? |
It looks like this only impacts the
|
I think it'd be good to decide if we are okay with the discrepancy between Index and Series behavior (#57074 (comment)) that this is further widening. It seems to me changing Series behavior would be quite disruptive, while I personally never do arithmetic with index objects. |
I guess this needs more discussion first so I'll close for now |
@mroeschke - any thoughts on the discrepancy between the resulting name of |
I also think there shouldn't be a result-name discrepancy between |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.