Skip to content

Commit 313ba71

Browse files
author
OlivierLuG
committed
TST: boolean indexing using .iloc pandas-dev#20627
1 parent 49b4f60 commit 313ba71

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

pandas/tests/frame/test_nonunique_indexes.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -530,14 +530,6 @@ def test_iloc_with_boolean_operation():
530530
expected = DataFrame([[0, 4], [8, 12], [8, 10], [12, np.nan]])
531531
tm.assert_frame_equal(result, expected)
532532

533-
result.iloc[result.index <= 2, 0] *= 2
534-
expected = DataFrame([[0, 4], [16, 12], [16, 10], [12, np.nan]])
535-
tm.assert_frame_equal(result, expected)
536-
537-
result.iloc[result.index > 2, 0] *= 2
538-
expected = DataFrame([[0, 4], [16, 12], [16, 10], [24, np.nan]])
539-
tm.assert_frame_equal(result, expected)
540-
541533
result.iloc[[False, False, True, True]] /= 2
542-
expected = DataFrame([[0.0, 4.0], [16.0, 12.0], [8.0, 5.0], [12.0, np.nan]])
534+
expected = DataFrame([[0.0, 4.0], [8.0, 12.0], [4.0, 5.0], [6.0, np.nan]])
543535
tm.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)