Skip to content

Commit 56ccad8

Browse files
kerncjreback
authored andcommitted
DOC: .groupby() aligns Series, accepts ndarray
closes #15789 closes #15244
1 parent 1bcb671 commit 56ccad8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/core/generic.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -4129,11 +4129,14 @@ def groupby(self, by=None, axis=0, level=None, as_index=True, sort=True,
41294129
41304130
Parameters
41314131
----------
4132-
by : mapping function / list of functions, dict, Series, or tuple /
4133-
list of column names or index level names.
4132+
by : mapping function / list of functions, dict, Series, ndarray,
4133+
or tuple / list of column names or index level names or
4134+
Series or ndarrays
41344135
Called on each element of the object index to determine the groups.
41354136
If a dict or Series is passed, the Series or dict VALUES will be
4136-
used to determine the groups
4137+
used to determine the groups (the Series' values are first
4138+
aligned; see ``.align()`` method). If ndarray is passed, the
4139+
values as-is determine the groups.
41374140
axis : int, default 0
41384141
level : int, level name, or sequence of such, default None
41394142
If the axis is a MultiIndex (hierarchical), group by a particular

0 commit comments

Comments
 (0)