@@ -1353,26 +1353,6 @@ def test_frame_setitem_empty_dataframe(self):
1353
1353
tm .assert_frame_equal (df , expected )
1354
1354
1355
1355
1356
- def test_full_setter_loc_incompatible_dtype ():
1357
- # https://github.com/pandas-dev/pandas/issues/55791
1358
- df = DataFrame ({"a" : [1 , 2 ]})
1359
- with tm .assert_produces_warning (FutureWarning , match = "incompatible dtype" ):
1360
- df .loc [:, "a" ] = True
1361
- expected = DataFrame ({"a" : [True , True ]})
1362
- tm .assert_frame_equal (df , expected )
1363
-
1364
- df = DataFrame ({"a" : [1 , 2 ]})
1365
- with tm .assert_produces_warning (FutureWarning , match = "incompatible dtype" ):
1366
- df .loc [:, "a" ] = {0 : 3.5 , 1 : 4.5 }
1367
- expected = DataFrame ({"a" : [3.5 , 4.5 ]})
1368
- tm .assert_frame_equal (df , expected )
1369
-
1370
- df = DataFrame ({"a" : [1 , 2 ]})
1371
- df .loc [:, "a" ] = {0 : 3 , 1 : 4 }
1372
- expected = DataFrame ({"a" : [3 , 4 ]})
1373
- tm .assert_frame_equal (df , expected )
1374
-
1375
-
1376
1356
def test_setitem_partial_row_multiple_columns ():
1377
1357
# https://github.com/pandas-dev/pandas/issues/56503
1378
1358
df = DataFrame ({"A" : [1 , 2 , 3 ], "B" : [4.0 , 5 , 6 ]})
0 commit comments