MCPcopy
hub / github.com/dask/dask / _simplify_up

Method _simplify_up

dask/dataframe/dask_expr/_expr.py:1340–1351  ·  view source on GitHub ↗
(self, parent, dependents)

Source from the content-addressed store, hash-verified

1338 _is_length_preserving = True
1339
1340 def _simplify_up(self, parent, dependents):
1341 if isinstance(parent, Filter) and self._filter_passthrough_available(
1342 parent, dependents
1343 ):
1344 predicate = None
1345 if self.frame.ndim == 1 and self.ndim == 2:
1346 name = self.frame._meta.name
1347 # Avoid Projection since we are already a Series
1348 subs = Projection(self, name)
1349 predicate = parent.predicate.substitute(subs, self.frame)
1350 return self._filter_simplification(parent, predicate)
1351 return super()._simplify_up(parent, dependents)
1352
1353
1354class RenameFrame(Elemwise):

Callers

nothing calls this directly

Calls 5

ProjectionClass · 0.85
substituteMethod · 0.45
_simplify_upMethod · 0.45

Tested by

no test coverage detected