Skip to content

DOC: .groupby() aligns Series, accepts ndarray #15789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down