Skip to content

Commit b4ba871

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tests/indexing/multiindex/test_setitem.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ def test_setitem_enlargement_multiindex_with_none(self):
505505
# Verify the shape and values
506506
assert df.shape == (5, 2)
507507
assert list(df.iloc[-1]) == [12.0, 13.0]
508-
508+
509509
# Verify we can retrieve the newly added row using None
510510
result = df.loc[("A", None), :]
511511
expected_row = Series([12.0, 13.0], index=[0, 1], name=("A", np.nan))
@@ -527,12 +527,12 @@ def test_setitem_enlargement_multiindex_multiple_none(self):
527527
assert df.shape == (4, 2)
528528
assert list(df.iloc[2]) == [5.0, 6.0]
529529
assert list(df.iloc[3]) == [7.0, 8.0]
530-
530+
531531
# Verify we can retrieve rows with None keys using np.nan
532532
result = df.loc[(np.nan, "c1"), :]
533533
expected_row = Series([5.0, 6.0], index=["x", "y"], name=(np.nan, "c1"))
534534
tm.assert_series_equal(result, expected_row)
535-
535+
536536
result = df.loc[("C", np.nan), :]
537537
expected_row = Series([7.0, 8.0], index=["x", "y"], name=("C", np.nan))
538538
tm.assert_series_equal(result, expected_row)

0 commit comments

Comments
 (0)