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

Method _simplify_up

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

Source from the content-addressed store, hash-verified

1264 )
1265
1266 def _simplify_up(self, parent, dependents):
1267 if isinstance(parent, Projection):
1268 columns = determine_column_projection(self, parent, dependents)
1269 frame_columns = [col for col in self.frame.columns if col in columns]
1270 other_columns = [col for col in self.other.columns if col in columns]
1271 if (
1272 self.frame.columns == frame_columns
1273 and self.other.columns == other_columns
1274 ):
1275 return
1276
1277 return type(parent)(
1278 type(self)(self.frame[frame_columns], self.other[other_columns]),
1279 *parent.operands[1:],
1280 )
1281
1282
1283class Sample(Blockwise):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected