-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Join behaved like an inner join when only one side had MultiIndex #37211
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
The change caused a few other tests to fail, which I have not run locally. All because the new result has a differently sorted index. Is this ok or do we have to figure a way out to get the old behavior? |
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on 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.
@phofl if you can merge master will have a look
doc/source/whatsnew/v1.2.0.rst
Outdated
@@ -474,6 +474,7 @@ Reshaping | |||
- Bug in func :meth:`crosstab` when using multiple columns with ``margins=True`` and ``normalize=True`` (:issue:`35144`) | |||
- Bug in :meth:`DataFrame.agg` with ``func={'name':<FUNC>}`` incorrectly raising ``TypeError`` when ``DataFrame.columns==['Name']`` (:issue:`36212`) | |||
- Bug in :meth:`Series.transform` would give incorrect results or raise when the argument ``func`` was dictionary (:issue:`35811`) | |||
- Bug in :func:`join` behaved like an inner join, when one side had a regular :class:`Index` while the other side had a :class:`MultiIndex` (:issue:`34292`) |
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.
move to 1.3
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
� Conflicts: � doc/source/whatsnew/v1.2.0.rst � pandas/core/indexes/base.py
@phofl status here? |
|
@phofl closing as stale. reopen when ready. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
We can use the regular path now, since
droplevel
can handle anIndex
. Only difference is a resorted result, becauseIndex.join()
does not preserve the order of the leading inputreturns
Edit: We may be able to delete the
_join_level
function, if we add alevel
keyword to the_join_multi
function to determine the overlap.