Skip to content

Commit dafc838

Browse files
committed
DOC: Clarification of groupby(by=) argument
1 parent e0bdfa7 commit dafc838

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/core/generic.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -5092,14 +5092,15 @@ def groupby(self, by=None, axis=0, level=None, as_index=True, sort=True,
50925092
50935093
Parameters
50945094
----------
5095-
by : mapping, function, str, or iterable
5095+
by : mapping, function, label, or list of labels
50965096
Used to determine the groups for the groupby.
50975097
If ``by`` is a function, it's called on each value of the object's
50985098
index. If a dict or Series is passed, the Series or dict VALUES
50995099
will be used to determine the groups (the Series' values are first
51005100
aligned; see ``.align()`` method). If an ndarray is passed, the
5101-
values are used as-is determine the groups. A str or list of strs
5102-
may be passed to group by the columns in ``self``
5101+
values are used as-is determine the groups. A label or list of
5102+
labels may be passed to group by the columns in ``self``. Notice
5103+
that a tuple is interpreted a (single) key.
51035104
axis : int, default 0
51045105
level : int, level name, or sequence of such, default None
51055106
If the axis is a MultiIndex (hierarchical), group by a particular

0 commit comments

Comments
 (0)