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

Class Apply

dask/dataframe/dask_expr/_expr.py:1830–1849  ·  view source on GitHub ↗

A good example of writing a less-trivial blockwise operation

Source from the content-addressed store, hash-verified

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

Callers 1

applyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected