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

Method _simplify_down

dask/dataframe/dask_expr/_expr.py:2572–2586  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2570 raise NotImplementedError()
2571
2572 def _simplify_down(self):
2573 if isinstance(self.frame, Elemwise):
2574 operands = [
2575 (
2576 Head(op, self.n, self.operand("npartitions"))
2577 if isinstance(op, Expr) and not isinstance(op, _DelayedExpr)
2578 else op
2579 )
2580 for op in self.frame.operands
2581 ]
2582 return type(self.frame)(*operands)
2583 if isinstance(self.frame, Head):
2584 return Head(
2585 self.frame.frame, min(self.n, self.frame.n), self.operand("npartitions")
2586 )
2587
2588 def _simplify_up(self, parent, dependents):
2589 from dask.dataframe.dask_expr import Repartition

Callers

nothing calls this directly

Calls 3

minFunction · 0.85
operandMethod · 0.80
HeadClass · 0.70

Tested by

no test coverage detected