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

Class Apply

dask/dataframe/dask_expr/_expr.py:1826–1845  ·  view source on GitHub ↗

A good example of writing a less-trivial blockwise operation

Source from the content-addressed store, hash-verified

1824
1825
1826class Apply(Elemwise):
1827 """A good example of writing a less-trivial blockwise operation"""
1828
1829 _parameters = ["frame", "function", "args", "meta", "kwargs"]
1830 _defaults = {"args": (), "kwargs": {}}
1831 operation = M.apply
1832
1833 @functools.cached_property
1834 def _meta(self):
1835 return make_meta(self.operand("meta"), parent_meta=self.frame._meta)
1836
1837 def _task(self, name: Key, index: int) -> Task:
1838 return Task(
1839 name,
1840 M.apply,
1841 TaskRef((self.frame._name, index)),
1842 self.function,
1843 *self.args,
1844 **self.kwargs,
1845 )
1846
1847
1848class Map(Elemwise):

Callers 1

applyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected