Skip to content

Commit

Permalink
Documentation updates for GH 5677
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon M. Mease committed Oct 15, 2016
1 parent ab31dd6 commit 224ba7d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions doc/source/groupby.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ The mapping can be specified many different ways:
- For DataFrame objects, a string indicating a column to be used to group. Of
course ``df.groupby('A')`` is just syntactic sugar for
``df.groupby(df['A'])``, but it makes life simpler
- For DataFrame objects, a string indicating an index level to be used to group.
If a string matches both an index level name and a column name then the column
takes precedence
- A list of any of the above things

Collectively we refer to the grouping objects as the **keys**. For example,
Expand Down
3 changes: 1 addition & 2 deletions doc/source/whatsnew/v0.20.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ New features

Other enhancements
^^^^^^^^^^^^^^^^^^


- Strings passed to ``DataFrame.groupby()`` as the ``by`` parameter may now reference either column names or index level names (:issue:`5677`)


.. _whatsnew_0200.api_breaking:
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3926,7 +3926,7 @@ 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.
list of column names or index level names.
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
Expand Down

0 comments on commit 224ba7d

Please sign in to comment.