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

Method _divisions

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

Source from the content-addressed store, hash-verified

3497 _expr_cls: AnyType | None = None
3498
3499 def _divisions(self):
3500 if {df.npartitions for df in self.args} == {1}:
3501 divs = []
3502 for df in self.args:
3503 divs.extend(list(df.divisions))
3504 try:
3505 return min(divs), max(divs)
3506 except TypeError:
3507 # either unknown divisions or int-str mix
3508 return None, None
3509 return calc_divisions_for_align(*self.args)
3510
3511 def _simplify_up(self, parent, dependents):
3512 if isinstance(parent, Projection) and self._projection_passthrough:

Callers

nothing calls this directly

Calls 3

minFunction · 0.85
maxFunction · 0.85
calc_divisions_for_alignFunction · 0.85

Tested by

no test coverage detected