MCPcopy
hub / github.com/pandas-dev/pandas / test_replace_unicode

Function test_replace_unicode

pandas/tests/strings/test_find_replace.py:622–626  ·  view source on GitHub ↗
(any_string_dtype)

Source from the content-addressed store, hash-verified

620
621
622def test_replace_unicode(any_string_dtype):
623 ser = Series([b"abcd,\xc3\xa0".decode("utf-8")], dtype=any_string_dtype)
624 expected = Series([b"abcd, \xc3\xa0".decode("utf-8")], dtype=any_string_dtype)
625 result = ser.str.replace(r"(?<=\w),(?=\w)", ", ", flags=re.UNICODE, regex=True)
626 tm.assert_series_equal(result, expected)
627
628
629@pytest.mark.parametrize("repl", [None, 3, {"a": "b"}])

Callers

nothing calls this directly

Calls 3

SeriesClass · 0.90
decodeMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected