We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36e9a5d commit f04d05dCopy full SHA for f04d05d
pandas/tests/frame/methods/test_replace.py
@@ -1512,7 +1512,7 @@ def test_replace_regex_dtype_frame(self, regex):
1512
result_df1 = df1.replace(to_replace="0", value=1, regex=regex)
1513
tm.assert_frame_equal(result_df1, expected_df1)
1514
1515
- df2 = DataFrame({"A": ["0"], "B": [np.NaN]})
1516
- expected_df2 = DataFrame({"A": [1], "B": [np.NaN]})
+ df2 = DataFrame({"A": ["0"], "B": ["1"]})
+ expected_df2 = DataFrame({"A": [1], "B": ["1"]})
1517
result_df2 = df2.replace(to_replace="0", value=1, regex=regex)
1518
tm.assert_frame_equal(result_df2, expected_df2)
0 commit comments