MCPcopy
hub / github.com/dask/dask / pipe

Method pipe

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

Source from the content-addressed store, hash-verified

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