We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d83f3c4 commit bb855f2Copy full SHA for bb855f2
pandas/tests/indexes/multi/test_setops.py
@@ -510,11 +510,10 @@ def test_union_nan_got_duplicated():
510
511
def test_union_duplicates(index):
512
# GH#38977
513
- # Index has to be sorted as of now.
514
if index.empty or isinstance(index, (IntervalIndex, CategoricalIndex)):
515
# No duplicates in empty indexes
516
return
517
- values = index.unique().sort_values().values.tolist()
+ values = index.unique().values.tolist()
518
mi1 = MultiIndex.from_arrays([values, [1] * len(values)])
519
mi2 = MultiIndex.from_arrays([[values[0]] + values, [1] * (len(values) + 1)])
520
result = mi1.union(mi2)
0 commit comments