From 5990c21d48492afd69a582c0b2f79d095a49b112 Mon Sep 17 00:00:00 2001 From: tpaxman Date: Tue, 23 May 2023 20:57:42 -0600 Subject: [PATCH] DOC: Inconsistencies in pandas.DataFrame.pivot_table parameter descriptions (#53351) --- pandas/core/frame.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 8afb3ee96ba94..d2e06a31598d4 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -8830,22 +8830,22 @@ def pivot(self, *, columns, index=lib.NoDefault, values=lib.NoDefault) -> DataFr values : list-like or scalar, optional Column or columns to aggregate. index : column, Grouper, array, or list of the previous - If an array is passed, it must be the same length as the data. The - list can contain any of the other types (except list). - Keys to group by on the pivot table index. If an array is passed, - it is being used as the same manner as column values. + Keys to group by on the pivot table index. If a list is passed, + it can contain any of the other types (except list). If an array is + passed, it must be the same length as the data and will be used in + the same manner as column values. columns : column, Grouper, array, or list of the previous - If an array is passed, it must be the same length as the data. The - list can contain any of the other types (except list). - Keys to group by on the pivot table column. If an array is passed, - it is being used as the same manner as column values. + Keys to group by on the pivot table column. If a list is passed, + it can contain any of the other types (except list). If an array is + passed, it must be the same length as the data and will be used in + the same manner as column values. aggfunc : function, list of functions, dict, default numpy.mean - If list of functions passed, the resulting pivot table will have + If a list of functions is passed, the resulting pivot table will have hierarchical columns whose top level are the function names - (inferred from the function objects themselves) - If dict is passed, the key is column to aggregate and value - is function or list of functions. If ``margin=True``, - aggfunc will be used to calculate the partial aggregates. + (inferred from the function objects themselves). + If a dict is passed, the key is column to aggregate and the value is + function or list of functions. If ``margin=True``, aggfunc will be + used to calculate the partial aggregates. fill_value : scalar, default None Value to replace missing values with (in the resulting pivot table, after aggregation).