@@ -745,7 +745,7 @@ def test_iloc_mask(self):
745
745
746
746
# the possibilities
747
747
locs = np .arange (4 )
748
- nums = 2 ** locs
748
+ nums = 2 ** locs
749
749
reps = [bin (num ) for num in nums ]
750
750
df = DataFrame ({"locs" : locs , "nums" : nums }, reps )
751
751
@@ -1197,7 +1197,14 @@ def test_iloc_setitem_multicolumn_to_datetime(self):
1197
1197
1198
1198
df .iloc [:, [0 ]] = DataFrame ({"A" : to_datetime (["2021" , "2022" ])})
1199
1199
expected = DataFrame (
1200
- {"A" : [Timestamp ("2021-01-01 00:00:00" ), Timestamp ("2022-01-01 00:00:00" )], "B" : ["2021" , "2022" ]}, dtype = object
1200
+ {
1201
+ "A" : [
1202
+ Timestamp ("2021-01-01 00:00:00" ),
1203
+ Timestamp ("2022-01-01 00:00:00" ),
1204
+ ],
1205
+ "B" : ["2021" , "2022" ],
1206
+ },
1207
+ dtype = object ,
1201
1208
)
1202
1209
tm .assert_frame_equal (df , expected )
1203
1210
@@ -1383,7 +1390,14 @@ def test_frame_iloc_setitem_callable_multicolumn_to_datetime(self):
1383
1390
1384
1391
df .iloc [:, [0 ]] = df .iloc [:, [0 ]].apply (to_datetime )
1385
1392
expected = DataFrame (
1386
- {"A" : [Timestamp ("2022-01-01 00:00:00" ), Timestamp ("2022-01-02 00:00:00" )], "B" : ["2021" , "2022" ]}, dtype = object
1393
+ {
1394
+ "A" : [
1395
+ Timestamp ("2022-01-01 00:00:00" ),
1396
+ Timestamp ("2022-01-02 00:00:00" ),
1397
+ ],
1398
+ "B" : ["2021" , "2022" ],
1399
+ },
1400
+ dtype = object ,
1387
1401
)
1388
1402
tm .assert_frame_equal (df , expected )
1389
1403
0 commit comments