-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Allow to union MultiIndex
with empty RangeIndex
#41275
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
@@ -414,6 +414,14 @@ def test_union_empty_self_different_names(): | |||
tm.assert_index_equal(result, expected) | |||
|
|||
|
|||
def test_union_multiindex_empty_rangeindex(): | |||
# GH#41234 | |||
mi = MultiIndex.from_arrays([[1, 2], [3, 4]], names=["a", "b"]) |
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.
test the reverse also
doc/source/whatsnew/v1.3.0.rst
Outdated
@@ -754,6 +754,7 @@ Indexing | |||
- Bug in :meth:`DataFrame.loc.__setitem__` when setting-with-expansion incorrectly raising when the index in the expanding axis contains duplicates (:issue:`40096`) | |||
- Bug in :meth:`DataFrame.loc` incorrectly matching non-boolean index elements (:issue:`20432`) | |||
- Bug in :meth:`Series.__delitem__` with ``ExtensionDtype`` incorrectly casting to ``ndarray`` (:issue:`40386`) | |||
- Bug in :meth:`MultiIndex.union` raising for an empty ``RangeIndex`` (:issue:`41234`) |
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.
is this a bug vc 1.2.x? if not then no whatsnew is needed (instead add this issue number next to the other release note)
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.
also i see that the actual issue is showing with concat; can u add a test for that as well
thanks @mlondschien |
MultiIndex
with emptyRangeIndex
raises #41234See also dask/dask#7610 and JDASoftwareGroup/kartothek#464. The regression seems to have been introduced in #38671.