@@ -523,14 +523,10 @@ def test_setitem_enlargement_multiindex_multiple_none(self):
523523 # Add row with None in second level
524524 df .loc [("C" , None ), :] = [7 , 8 ]
525525
526- # Add row with None in both levels
527- df .loc [(None , None ), :] = [9 , 10 ]
528-
529526 # Verify the shape and values
530- assert df .shape == (5 , 2 )
527+ assert df .shape == (4 , 2 )
531528 assert list (df .iloc [2 ]) == [5.0 , 6.0 ]
532529 assert list (df .iloc [3 ]) == [7.0 , 8.0 ]
533- assert list (df .iloc [4 ]) == [9.0 , 10.0 ]
534530
535531 # Verify we can retrieve rows with None keys using np.nan
536532 result = df .loc [(np .nan , "c1" ), :]
@@ -540,10 +536,6 @@ def test_setitem_enlargement_multiindex_multiple_none(self):
540536 result = df .loc [("C" , np .nan ), :]
541537 expected_row = Series ([7.0 , 8.0 ], index = ["x" , "y" ], name = ("C" , np .nan ))
542538 tm .assert_series_equal (result , expected_row )
543-
544- result = df .loc [(np .nan , np .nan ), :]
545- expected_row = Series ([9.0 , 10.0 ], index = ["x" , "y" ], name = (np .nan , np .nan ))
546- tm .assert_series_equal (result , expected_row )
547539
548540
549541def test_frame_setitem_view_direct (multiindex_dataframe_random_data ):
0 commit comments