Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit 7ca5a6b

Browse files
authored
DOC: update shared_docs to clarify groupby with lists (pandas-dev#44569)
1 parent d621e8e commit 7ca5a6b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pandas/core/shared_docs.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@
9494
If ``by`` is a function, it's called on each value of the object's
9595
index. If a dict or Series is passed, the Series or dict VALUES
9696
will be used to determine the groups (the Series' values are first
97-
aligned; see ``.align()`` method). If an ndarray is passed, the
98-
values are used as-is to determine the groups. A label or list of
99-
labels may be passed to group by the columns in ``self``. Notice
100-
that a tuple is interpreted as a (single) key.
97+
aligned; see ``.align()`` method). If a list or ndarray of length
98+
equal to the selected axis is passed (see the `groupby user guide
99+
<https://pandas.pydata.org/pandas-docs/stable/user_guide/groupby.html#splitting-an-object-into-groups>`),
100+
the values are used as-is to determine the groups. A label or list
101+
of labels may be passed to group by the columns in ``self``.
102+
Notice that a tuple is interpreted as a (single) key.
101103
axis : {0 or 'index', 1 or 'columns'}, default 0
102104
Split along rows (0) or columns (1).
103105
level : int, level name, or sequence of such, default None

0 commit comments

Comments
 (0)