Skip to content

Commit 2981e29

Browse files
committed
fixup
1 parent d9ead32 commit 2981e29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tests/frame/methods/test_replace.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,10 +1482,10 @@ def test_replace_regex_dtype_frame(self, regex, value):
14821482

14831483
df2 = DataFrame({"A": ["0"], "B": ["1"]})
14841484
if regex:
1485-
expected_df2 = DataFrame({"A": [1], "B": ["1"]}, dtype=dtype)
1485+
expected_df2 = DataFrame({"A": [value], "B": ["1"]}, dtype=dtype)
14861486
else:
1487-
expected_df2 = DataFrame({"A": Series([1], dtype=dtype), "B": ["1"]})
1488-
result_df2 = df2.replace(to_replace="0", value=1, regex=regex)
1487+
expected_df2 = DataFrame({"A": Series([value], dtype=dtype), "B": ["1"]})
1488+
result_df2 = df2.replace(to_replace="0", value=value, regex=regex)
14891489
tm.assert_frame_equal(result_df2, expected_df2)
14901490

14911491
def test_replace_with_value_also_being_replaced(self):

0 commit comments

Comments
 (0)