Skip to content

Commit ee18953

Browse files
committed
Simplify test
1 parent 6cf8b26 commit ee18953

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pandas/tests/series/indexing/test_setitem.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,9 @@ def test_setitem_boolean_different_order(self, string_series):
130130

131131
def test_setitem_boolean_ea_type(self):
132132
# GH: 26468
133-
df = DataFrame(
134-
{"a": [0, 0, np.nan, np.nan], "b": array(range(4), dtype="Int64")}
135-
)
136-
s = Series(array([1] * 4, dtype="Int64"))
137-
s[df["a"].isna()] = df.loc[df["a"].isna(), "b"]
138-
expected = Series([1, 1, 2, 3], dtype="Int64")
133+
s = Series(array([5, 6, 7, 8], dtype="Int64"))
134+
s[s > 6] = Series(range(4), dtype="Int64")
135+
expected = Series([5, 6, 2, 3], dtype="Int64")
139136
tm.assert_series_equal(s, expected)
140137

141138

0 commit comments

Comments
 (0)