(self, method, pat=None, n=-1, expand=False)
| 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``.""" |
no test coverage detected