-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: allow None as name in multi-index during join #59546
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.
This is looking good to me, but we were explicit about not allowing None
in the past and I'm not sure why. Traced it back to:
- issue: Merge on single level of MultiIndex #3662
- commit: dd79e55
Don't see any discussion about None
. Can you take a look @mroeschke
doc/source/whatsnew/v3.0.0.rst
Outdated
@@ -28,6 +28,7 @@ enhancement2 | |||
|
|||
Other enhancements | |||
^^^^^^^^^^^^^^^^^^ | |||
- :attr:`MultiIndex.names` containing ``None`` no longer throws ``AssertionError`` during join (:issue:`58721`) |
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 move the note to the Reshaping
section of bugfixes.
9bbf1d8
to
abb0976
Compare
Automatic codeowner review requests were unintended, sorry. I accidentally pushed commits from my fork to this branch and that touched files unrelated to this PR. Force-pushed them away. |
Co-authored-by: Matthew Roeschke <[email protected]>
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
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Thanks @matiaslindgren |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Another possible fix is to throw if
MultiIndex.names
containsNone
.The exception message could say something like "empty index names must be empty strings, not None".