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

Function test_encode_decode

pandas/tests/strings/test_strings.py:661–665  ·  view source on GitHub ↗
(any_string_dtype)

Source from the content-addressed store, hash-verified

659
660
661def test_encode_decode(any_string_dtype):
662 ser = Series(["a", "b", "a\xe4"], dtype=any_string_dtype).str.encode("utf-8")
663 result = ser.str.decode("utf-8")
664 expected = Series(["a", "b", "a\xe4"], dtype="str")
665 tm.assert_series_equal(result, expected)
666
667
668def test_encode_errors_kwarg(any_string_dtype):

Callers

nothing calls this directly

Calls 3

SeriesClass · 0.90
encodeMethod · 0.80
decodeMethod · 0.80

Tested by

no test coverage detected