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

Class Apply

dask/dataframe/dask_expr/_expr.py:1829–1848  ·  view source on GitHub ↗

A good example of writing a less-trivial blockwise operation

Source from the content-addressed store, hash-verified

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

Callers 1

applyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected