MCPcopy Index your code
hub / github.com/dask/dask / CombineFirst

Class CombineFirst

dask/dataframe/dask_expr/_expr.py:1253–1280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1251
1252
1253class CombineFirst(Blockwise):
1254 _parameters = ["frame", "other"]
1255 operation = M.combine_first
1256
1257 @functools.cached_property
1258 def _meta(self):
1259 return make_meta(
1260 self.operation(
1261 meta_nonempty(self.frame._meta),
1262 meta_nonempty(self.other._meta),
1263 ),
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 1

combine_firstMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…