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

Class CombineFirstAlign

dask/dataframe/dask_expr/_expr.py:3576–3595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3574
3575
3576class CombineFirstAlign(MaybeAlignPartitions):
3577 _parameters = ["frame", "other"]
3578 _expr_cls = CombineFirst
3579
3580 def _simplify_up(self, parent, dependents):
3581 # TODO: de-duplicate
3582 if isinstance(parent, Projection):
3583 columns = determine_column_projection(self, parent, dependents)
3584 frame_columns = [col for col in self.frame.columns if col in columns]
3585 other_columns = [col for col in self.other.columns if col in columns]
3586 if (
3587 self.frame.columns == frame_columns
3588 and self.other.columns == other_columns
3589 ):
3590 return
3591
3592 return type(parent)(
3593 type(self)(self.frame[frame_columns], self.other[other_columns]),
3594 *parent.operands[1:],
3595 )
3596
3597
3598class FillnaAlign(MaybeAlignPartitions):

Callers 1

combine_firstMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected