Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshadrach committed Jan 5, 2025
1 parent d9ead32 commit 2981e29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pandas/tests/frame/methods/test_replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -1482,10 +1482,10 @@ def test_replace_regex_dtype_frame(self, regex, value):

df2 = DataFrame({"A": ["0"], "B": ["1"]})
if regex:
expected_df2 = DataFrame({"A": [1], "B": ["1"]}, dtype=dtype)
expected_df2 = DataFrame({"A": [value], "B": ["1"]}, dtype=dtype)
else:
expected_df2 = DataFrame({"A": Series([1], dtype=dtype), "B": ["1"]})
result_df2 = df2.replace(to_replace="0", value=1, regex=regex)
expected_df2 = DataFrame({"A": Series([value], dtype=dtype), "B": ["1"]})
result_df2 = df2.replace(to_replace="0", value=value, regex=regex)
tm.assert_frame_equal(result_df2, expected_df2)

def test_replace_with_value_also_being_replaced(self):
Expand Down

0 comments on commit 2981e29

Please sign in to comment.