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

Method pipe

dask/dataframe/dask_expr/_collection.py:2560–2570  ·  view source on GitHub ↗
(self, func, *args, **kwargs)

Source from the content-addressed store, hash-verified

2558
2559 @derived_from(pd.DataFrame)
2560 def pipe(self, func, *args, **kwargs):
2561 if isinstance(func, tuple):
2562 func, target = func
2563 if target in kwargs:
2564 raise ValueError(
2565 "%s is both the pipe target and a keyword argument" % target
2566 )
2567 kwargs[target] = self
2568 return func(*args, **kwargs)
2569 else:
2570 return func(self, *args, **kwargs)
2571
2572 def sample(self, n=None, frac=None, replace=False, random_state=None):
2573 """Random sample of items

Callers 4

graphviz_to_fileFunction · 0.80
_construct_graphMethod · 0.80
test_pipeFunction · 0.80
test_pipeFunction · 0.80

Calls 1

funcFunction · 0.50

Tested by 2

test_pipeFunction · 0.64
test_pipeFunction · 0.64