Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
TST: added xfailing test on iloc with dups
  • Loading branch information
toobaz committed Aug 9, 2017
commit b8ee051d5d77496688eb19f6673c900ec4cfedc4
14 changes: 14 additions & 0 deletions pandas/tests/indexing/test_iloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,20 @@ def test_iloc_setitem_dups(self):
drop=True)
tm.assert_frame_equal(df, expected)

@pytest.mark.xfail(reason="BlockManager.setitem() broken")
def test_iloc_setitem_dups_slice(self):
# GH 12991
df = DataFrame(index=['a', 'b', 'c'],
columns=['d', 'e', 'd']).fillna(0)
expected = df.iloc[:, 2].copy(deep=True)

first_col = df.iloc[:, 0]
first_col['a'] = 3

result = df.iloc[:, 2]

tm.assert_series_equal(result, expected)

def test_iloc_getitem_frame(self):
df = DataFrame(np.random.randn(10, 4), index=lrange(0, 20, 2),
columns=lrange(0, 8, 2))
Expand Down