Skip to content

Commit de098e0

Browse files
committed
TST: added xfailing test on iloc with dups
1 parent 99e44d7 commit de098e0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pandas/tests/indexing/test_iloc.py

+11
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,17 @@ def test_iloc_setitem_dups(self):
332332
drop=True)
333333
tm.assert_frame_equal(df, expected)
334334

335+
@pytest.mark.xfail(reason="BlockManager.setitem() broken")
336+
def test_iloc_setitem_dups_mixed_df(self):
337+
# GH 12991
338+
df1 = DataFrame([{'A': None, 'B': 1}, {'A': 2, 'B': 2}])
339+
df2 = DataFrame([{'A': 3, 'B': 3}, {'A': 4, 'B': 4}])
340+
df = concat([df1, df2], axis=1)
341+
342+
expected = df.fillna(15)
343+
df.iloc[0, 0] = 15
344+
tm.assert_frame_equal(df, expected)
345+
335346
def test_iloc_getitem_frame(self):
336347
df = DataFrame(np.random.randn(10, 4), index=lrange(0, 20, 2),
337348
columns=lrange(0, 8, 2))

0 commit comments

Comments
 (0)