diff --git a/pandas/tests/test_strings.py b/pandas/tests/test_strings.py index d49338af698d1..d057dc5304277 100644 --- a/pandas/tests/test_strings.py +++ b/pandas/tests/test_strings.py @@ -350,8 +350,8 @@ def test_replace(self): tm.assert_series_equal(result, exp) #flags + unicode - values = Series(["abcd,\xc3\xa0".decode("utf-8")]) - exp = Series(["abcd, \xc3\xa0".decode("utf-8")]) + values = Series([b"abcd,\xc3\xa0".decode("utf-8")]) + exp = Series([b"abcd, \xc3\xa0".decode("utf-8")]) result = values.str.replace("(?<=\w),(?=\w)", ", ", flags=re.UNICODE) tm.assert_series_equal(result, exp)