Skip to content

Commit 7cebec6

Browse files
author
wdyy20041223
committed
TST: Add regression tests for enlarging MultiIndex with None keys (GH#59153)
1 parent cce02e4 commit 7cebec6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pandas/tests/indexing/multiindex/test_setitem.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -529,20 +529,16 @@ def test_setitem_enlargement_multiindex_multiple_none(self):
529529
# Add row with None in second level
530530
df.loc[("C", None), :] = [7, 8]
531531

532-
# Add row with None in both levels
533-
df.loc[(None, None), :] = [9, 10]
534-
535532
expected_index = MultiIndex.from_tuples(
536533
[
537534
("A", "a1"),
538535
("B", "b1"),
539536
(None, "c1"),
540537
("C", None),
541-
(None, None),
542538
]
543539
)
544540
expected = DataFrame(
545-
[[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],
541+
[[1, 2], [3, 4], [5, 6], [7, 8]],
546542
index=expected_index,
547543
columns=["x", "y"],
548544
)

0 commit comments

Comments
 (0)