Skip to content

Commit 2a37bf6

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

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pandas/tests/indexing/test_iloc.py

+12
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from warnings import catch_warnings
66
import numpy as np
7+
import pytest
78

89
import pandas as pd
910
from pandas.compat import lrange, lmap
@@ -332,6 +333,17 @@ def test_iloc_setitem_dups(self):
332333
drop=True)
333334
tm.assert_frame_equal(df, expected)
334335

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

0 commit comments

Comments
 (0)