| 165 | |
| 166 | |
| 167 | class SplitMap(FunctionMap): |
| 168 | _parameters = ["frame", "accessor", "attr", "args", "kwargs"] |
| 169 | |
| 170 | @property |
| 171 | def n(self): |
| 172 | return self.kwargs["n"] |
| 173 | |
| 174 | @property |
| 175 | def pat(self): |
| 176 | return self.kwargs["pat"] |
| 177 | |
| 178 | @property |
| 179 | def expand(self): |
| 180 | return self.kwargs["expand"] |
| 181 | |
| 182 | @functools.cached_property |
| 183 | def _meta(self): |
| 184 | delimiter = " " if self.pat is None else self.pat |
| 185 | meta = meta_nonempty(self.frame._meta) |
| 186 | meta = self.frame._meta._constructor( |
| 187 | [delimiter.join(["a"] * (self.n + 1))], |
| 188 | index=meta.iloc[:1].index, |
| 189 | ) |
| 190 | return make_meta( |
| 191 | getattr(meta.str, self.attr)(n=self.n, expand=self.expand, pat=self.pat) |
| 192 | ) |
no outgoing calls
no test coverage detected
searching dependent graphs…