63
63
_shared_docs = dict ()
64
64
_shared_doc_kwargs = dict (
65
65
axes = 'keywords for axes' , klass = 'NDFrame' ,
66
+ axis = """
67
+ axis : {0 or 'index', 1 or 'columns'}, default 0
68
+ - 0 or 'index': apply function to each column.
69
+ - 1 or 'columns': apply function to each row.""" ,
66
70
axes_single_arg = 'int or labels for object' ,
67
71
args_transpose = 'axes to permute (int or label for object)' ,
68
72
optional_by = """
@@ -4545,17 +4549,16 @@ def pipe(self, func, *args, **kwargs):
4545
4549
4546
4550
Parameters
4547
4551
----------
4548
- func : function, string, dictionary, or list of string/functions
4552
+ func : function, string, list of string/functions or dictionary
4549
4553
Function to use for aggregating the data. If a function, must either
4550
- work when passed a %(klass)s or when passed to %(klass)s.apply. For
4551
- a DataFrame, can pass a dict, if the keys are DataFrame column names.
4554
+ work when passed a %(klass)s or when passed to %(klass)s.apply.
4552
4555
4553
4556
Accepted combinations are:
4554
4557
4555
- - string function name.
4556
- - function.
4557
- - list of functions.
4558
- - dict of column names -> functions ( or list of functions).
4558
+ - string function name
4559
+ - function
4560
+ - list of functions and/or function names
4561
+ - dict of axis labels -> functions, function names and/ or list of such
4559
4562
%(axis)s
4560
4563
*args
4561
4564
Positional arguments to pass to `func`.
@@ -4581,15 +4584,24 @@ def pipe(self, func, *args, **kwargs):
4581
4584
4582
4585
Parameters
4583
4586
----------
4584
- func : callable, string, dictionary, or list of string/callables
4585
- To apply to column
4587
+ func : function, string, list of string/functions or dictionary
4588
+ Function to use for transforming the data. If a function, must either
4589
+ work when passed a %(klass)s or when passed to %(klass)s.apply.
4590
+ The function (or each function in a list/dict) must return an
4591
+ object with the same length for the provided axis as the
4592
+ calling %(klass)s.
4586
4593
4587
- Accepted Combinations are:
4594
+ Accepted combinations are:
4588
4595
4589
4596
- string function name
4590
4597
- function
4591
- - list of functions
4592
- - dict of column names -> functions (or list of functions)
4598
+ - list of functions and/or function names
4599
+ - dict of axis labels -> functions, function names and/or list of such
4600
+ %(axis)s
4601
+ *args
4602
+ Positional arguments to pass to `func`.
4603
+ **kwargs
4604
+ Keyword arguments to pass to `func`.
4593
4605
4594
4606
Returns
4595
4607
-------
0 commit comments