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

Function _meta_apply_transform

dask/dataframe/dask_expr/_groupby.py:1288–1304  ·  view source on GitHub ↗
(obj, grp_func)

Source from the content-addressed store, hash-verified

1286
1287
1288def _meta_apply_transform(obj, grp_func):
1289 kwargs = obj.operand("kwargs")
1290 by_meta = obj._by_meta
1291 by_meta = [x if is_scalar(x) else meta_nonempty(x) for x in by_meta]
1292 meta_args, meta_kwargs = _extract_meta((obj.operand("args"), kwargs), nonempty=True)
1293 return make_meta(
1294 grp_func(
1295 meta_nonempty(obj.frame._meta),
1296 by_meta,
1297 key=obj._slice,
1298 args=meta_args,
1299 **_as_dict("observed", obj.observed),
1300 **_as_dict("dropna", obj.dropna),
1301 **_as_dict("group_keys", obj.group_keys),
1302 **meta_kwargs,
1303 )
1304 )
1305
1306
1307def groupby_projection(expr, parent, dependents):

Callers 2

_metaMethod · 0.85
_metaMethod · 0.85

Calls 5

is_scalarFunction · 0.90
_extract_metaFunction · 0.90
make_metaFunction · 0.90
_as_dictFunction · 0.85
operandMethod · 0.80

Tested by

no test coverage detected