MCPcopy
hub / github.com/dask/dask / _split

Method _split

dask/dataframe/dask_expr/_str_accessor.py:78–97  ·  view source on GitHub ↗
(self, method, pat=None, n=-1, expand=False)

Source from the content-addressed store, hash-verified

76 _accessor_properties = ()
77
78 def _split(self, method, pat=None, n=-1, expand=False):
79 from dask.dataframe.dask_expr import new_collection
80
81 if expand:
82 if n == -1:
83 raise NotImplementedError(
84 "To use the expand parameter you must specify the number of "
85 "expected splits with the n= parameter. Usually n splits "
86 "result in n+1 output columns."
87 )
88 return new_collection(
89 SplitMap(
90 self._series,
91 self._accessor_name,
92 method,
93 (),
94 {"pat": pat, "n": n, "expand": expand},
95 )
96 )
97 return self._function_map(method, pat=pat, n=n, expand=expand)
98
99 def split(self, pat=None, n=-1, expand=False):
100 """Known inconsistencies: ``expand=True`` with unknown ``n`` will raise a ``NotImplementedError``."""

Callers 2

splitMethod · 0.95
rsplitMethod · 0.95

Calls 3

new_collectionFunction · 0.90
SplitMapClass · 0.85
_function_mapMethod · 0.80

Tested by

no test coverage detected