Skip to content

Commit b5c2264

Browse files
committed
Add gh reference and whatsnew
1 parent 693da38 commit b5c2264

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/source/whatsnew/v1.3.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ MultiIndex
256256
- Bug in :meth:`DataFrame.drop` raising ``TypeError`` when :class:`MultiIndex` is non-unique and no level is provided (:issue:`36293`)
257257
- Bug in :meth:`MultiIndex.equals` incorrectly returning ``True`` when :class:`MultiIndex` containing ``NaN`` even when they are differntly ordered (:issue:`38439`)
258258
- Bug in :meth:`MultiIndex.intersection` always returning empty when intersecting with :class:`CategoricalIndex` (:issue:`38653`)
259+
- Bug in :meth:`MultiIndex.union` dropping duplicates from result (:issue:`38977`)
259260

260261
I/O
261262
^^^

pandas/tests/indexes/multi/test_setops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,15 +486,15 @@ def test_intersection_different_names():
486486

487487

488488
def test_union_nan_got_duplicated():
489-
# GH
489+
# GH#38977
490490
mi1 = MultiIndex.from_arrays([[1.0, np.nan], [2, 3]])
491491
mi2 = MultiIndex.from_arrays([[1.0, np.nan, 3.0], [2, 3, 4]])
492492
result = mi1.union(mi2)
493493
tm.assert_index_equal(result, mi2)
494494

495495

496496
def test_union_duplicates(index):
497-
# GH
497+
# GH#38977
498498
# Index has to be sorted as of now.
499499
if index.empty or isinstance(index, (IntervalIndex, CategoricalIndex)):
500500
# No duplicates in empty indexes

0 commit comments

Comments
 (0)