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

Function emulate

dask/dataframe/dask_expr/_expr.py:4106–4112  ·  view source on GitHub ↗

Apply a function using args / kwargs. If arguments contain dd.DataFrame / dd.Series, using internal cache (``_meta``) for calculation

(func, *args, udf=False, **kwargs)

Source from the content-addressed store, hash-verified

4104
4105
4106def emulate(func, *args, udf=False, **kwargs):
4107 """
4108 Apply a function using args / kwargs. If arguments contain dd.DataFrame /
4109 dd.Series, using internal cache (``_meta``) for calculation
4110 """
4111 with raise_on_meta_error(funcname(func), udf=udf):
4112 return func(*_extract_meta(args, True), **_extract_meta(kwargs, True))
4113
4114
4115def _get_meta_map_partitions(args, dfs, func, kwargs, meta, parent_meta):

Callers 1

_get_meta_map_partitionsFunction · 0.85

Calls 4

raise_on_meta_errorFunction · 0.90
funcnameFunction · 0.90
_extract_metaFunction · 0.85
funcFunction · 0.50

Tested by

no test coverage detected