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

Function test_partition_with_name

pandas/tests/strings/test_split_partition.py:672–680  ·  view source on GitHub ↗
(any_string_dtype)

Source from the content-addressed store, hash-verified

670
671
672def test_partition_with_name(any_string_dtype):
673 # GH 12617
674
675 s = Series(["a,b", "c,d"], name="xxx", dtype=any_string_dtype)
676 result = s.str.partition(",")
677 expected = DataFrame(
678 {0: ["a", "c"], 1: [",", ","], 2: ["b", "d"]}, dtype=any_string_dtype
679 )
680 tm.assert_frame_equal(result, expected)
681
682
683def test_partition_with_name_expand(any_string_dtype):

Callers

nothing calls this directly

Calls 3

SeriesClass · 0.90
DataFrameClass · 0.90
partitionMethod · 0.80

Tested by

no test coverage detected