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

Method pipe

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

Source from the content-addressed store, hash-verified

2598
2599 @derived_from(pd.DataFrame)
2600 def pipe(self, func, *args, **kwargs):
2601 if isinstance(func, tuple):
2602 func, target = func
2603 if target in kwargs:
2604 raise ValueError(
2605 f"{target} is both the pipe target and a keyword argument"
2606 )
2607 kwargs[target] = self
2608 return func(*args, **kwargs)
2609 else:
2610 return func(self, *args, **kwargs)
2611
2612 def sample(self, n=None, frac=None, replace=False, random_state=None):
2613 """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