From 2981e296c0f456d6b5370296a3afc70d2aaab031 Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 5 Jan 2025 15:15:51 -0500 Subject: [PATCH] fixup --- pandas/tests/frame/methods/test_replace.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/tests/frame/methods/test_replace.py b/pandas/tests/frame/methods/test_replace.py index 138620a3a098e..e5bd8a9c45b55 100644 --- a/pandas/tests/frame/methods/test_replace.py +++ b/pandas/tests/frame/methods/test_replace.py @@ -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):