Skip to content

Commit efc3958

Browse files
committed
TST: added xfailing test on iloc with dups
1 parent cbdd91a commit efc3958

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
@@ -2,6 +2,7 @@
22

33
from warnings import catch_warnings
44
import numpy as np
5+
import pytest
56

67
import pandas as pd
78
from pandas.compat import lrange, lmap
@@ -329,6 +330,17 @@ def test_iloc_setitem_dups(self):
329330
drop=True)
330331
tm.assert_frame_equal(df, expected)
331332

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

0 commit comments

Comments
 (0)