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

Method _str_join

pandas/core/arrays/arrow/array.py:2767–2775  ·  view source on GitHub ↗
(self, sep: str)

Source from the content-addressed store, hash-verified

2765 return self._from_pyarrow_array(pc.binary_repeat(self._pa_array, repeats))
2766
2767 def _str_join(self, sep: str) -> Self:
2768 if pa.types.is_string(self._pa_array.type) or pa.types.is_large_string(
2769 self._pa_array.type
2770 ):
2771 result = self._apply_elementwise(list)
2772 result = pa.chunked_array(result, type=pa.list_(pa.string()))
2773 else:
2774 result = self._pa_array
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)

Callers

nothing calls this directly

Calls 3

_apply_elementwiseMethod · 0.95
_from_pyarrow_arrayMethod · 0.95
stringMethod · 0.80

Tested by

no test coverage detected