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

Method _str_partition

pandas/core/arrays/arrow/array.py:2777–2780  ·  view source on GitHub ↗
(self, sep: str, expand: bool)

Source from the content-addressed store, hash-verified

2775 return self._from_pyarrow_array(pc.binary_join(result, sep))
2776
2777 def _str_partition(self, sep: str, expand: bool) -> Self:
2778 predicate = lambda val: val.partition(sep)
2779 result = self._apply_elementwise(predicate)
2780 return self._from_pyarrow_array(pa.chunked_array(result))
2781
2782 def _str_rpartition(self, sep: str, expand: bool) -> Self:
2783 predicate = lambda val: val.rpartition(sep)

Callers

nothing calls this directly

Calls 3

_apply_elementwiseMethod · 0.95
_from_pyarrow_arrayMethod · 0.95
partitionMethod · 0.80

Tested by

no test coverage detected