| 99 | |
| 100 | |
| 101 | class FunctionMap(Elemwise): |
| 102 | _parameters = ["frame", "accessor", "attr", "args", "kwargs"] |
| 103 | |
| 104 | @functools.cached_property |
| 105 | def _meta(self): |
| 106 | args = [ |
| 107 | meta_nonempty(op._meta) if isinstance(op, Expr) else op for op in self._args |
| 108 | ] |
| 109 | return make_meta(self.operation(*args, **self._kwargs)) |
| 110 | |
| 111 | @staticmethod |
| 112 | def operation(obj, accessor, attr, args, kwargs): |
| 113 | out = getattr(getattr(obj, accessor, obj), attr)(*args, **kwargs) |
| 114 | return maybe_wrap_pandas(obj, out) |
| 115 | |
| 116 | |
| 117 | class FunctionMapIndex(FunctionMap): |
no outgoing calls
no test coverage detected
searching dependent graphs…