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

Function test_pipe_failures

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

Source from the content-addressed store, hash-verified

480
481
482def test_pipe_failures(any_string_dtype):
483 # #2119
484 ser = Series(["A|B|C"], dtype=any_string_dtype)
485
486 result = ser.str.split("|")
487 expected = Series([["A", "B", "C"]], dtype=object)
488 tm.assert_series_equal(result, expected)
489
490 result = ser.str.replace("|", " ", regex=False)
491 expected = Series(["A B C"], dtype=any_string_dtype)
492 tm.assert_series_equal(result, expected)
493
494
495@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

SeriesClass · 0.90
splitMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected