From f2df87470bfd47bf23f73fce30e8937ac4419640 Mon Sep 17 00:00:00 2001 From: Kernc Date: Thu, 23 Mar 2017 18:42:20 +0100 Subject: [PATCH] DOC: .groupby() aligns Series, accepts ndarray --- pandas/core/generic.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 87052800b8fb5..f51e69737397c 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -4129,11 +4129,14 @@ def groupby(self, by=None, axis=0, level=None, as_index=True, sort=True, Parameters ---------- - by : mapping function / list of functions, dict, Series, or tuple / - list of column names or index level names. + by : mapping function / list of functions, dict, Series, ndarray, \ + or tuple / list of column names or index level names or \ + Series or ndarrays Called on each element of the object index to determine the groups. If a dict or Series is passed, the Series or dict VALUES will be - used to determine the groups + used to determine the groups (the Series' values are first + aligned; see ``.align()`` method). If ndarray is passed, the + values as-is determine the groups. axis : int, default 0 level : int, level name, or sequence of such, default None If the axis is a MultiIndex (hierarchical), group by a particular