MCPcopy Create free account
hub / github.com/dask/dask / _bind_method

Function _bind_method

dask/dataframe/accessor.py:12–22  ·  view source on GitHub ↗
(cls, pd_cls, attr, min_version=None)

Source from the content-addressed store, hash-verified

10
11
12def _bind_method(cls, pd_cls, attr, min_version=None):
13 def func(self, *args, **kwargs):
14 return self._function_map(attr, *args, **kwargs)
15
16 func.__name__ = attr
17 func.__qualname__ = f"{cls.__name__}.{attr}"
18 try:
19 func.__wrapped__ = getattr(pd_cls, attr)
20 except Exception:
21 pass
22 setattr(cls, attr, derived_from(pd_cls, version=min_version)(func))
23
24
25def _bind_property(cls, pd_cls, attr, min_version=None):

Callers 1

__init_subclass__Method · 0.90

Calls 1

derived_fromFunction · 0.90

Tested by

no test coverage detected