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

Method pipe

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

Source from the content-addressed store, hash-verified

2562
2563 @derived_from(pd.DataFrame)
2564 def pipe(self, func, *args, **kwargs):
2565 if isinstance(func, tuple):
2566 func, target = func
2567 if target in kwargs:
2568 raise ValueError(
2569 f"{target} is both the pipe target and a keyword argument"
2570 )
2571 kwargs[target] = self
2572 return func(*args, **kwargs)
2573 else:
2574 return func(self, *args, **kwargs)
2575
2576 def sample(self, n=None, frac=None, replace=False, random_state=None):
2577 """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