hipdf.DataFrame.pipe#
1 min read time
Applies to Linux
- DataFrame.pipe(func, *args, **kwargs)#
Apply
func(self, *args, **kwargs).Parameters#
- funcfunction
Function to apply to the Series/DataFrame.
args, andkwargsare passed intofunc. Alternatively a(callable, data_keyword)tuple wheredata_keywordis a string indicating the keyword ofcallablethat expects the Series/DataFrame.- argsiterable, optional
Positional arguments passed into
func.- kwargsmapping, optional
A dictionary of keyword arguments passed into
func.
Returns#
object : the return type of
func.Examples#
Use
.pipewhen chaining together functions that expect Series, DataFrames or GroupBy objects.>>> import cudf >>> df = cudf.DataFrame({'a': [1, 2, 3]}) >>> def add_one(x): ... return x + 1 >>> df.pipe(add_one) a 0 2 1 3 2 4