Skip to content

Commit

Permalink
Doc: corrects spelling in generic.py (pandas-dev#25333)
Browse files Browse the repository at this point in the history
  • Loading branch information
jevandezande authored and Pingviinituutti committed Feb 28, 2019
1 parent 5ccd42c commit 13deaaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7604,16 +7604,16 @@ def groupby(self, by=None, axis=0, level=None, as_index=True, sort=True,
using the `level` parameter:
>>> arrays = [['Falcon', 'Falcon', 'Parrot', 'Parrot'],
... ['Capitve', 'Wild', 'Capitve', 'Wild']]
... ['Captive', 'Wild', 'Captive', 'Wild']]
>>> index = pd.MultiIndex.from_arrays(arrays, names=('Animal', 'Type'))
>>> df = pd.DataFrame({'Max Speed' : [390., 350., 30., 20.]},
... index=index)
>>> df
Max Speed
Animal Type
Falcon Capitve 390.0
Falcon Captive 390.0
Wild 350.0
Parrot Capitve 30.0
Parrot Captive 30.0
Wild 20.0
>>> df.groupby(level=0).mean()
Max Speed
Expand All @@ -7623,7 +7623,7 @@ def groupby(self, by=None, axis=0, level=None, as_index=True, sort=True,
>>> df.groupby(level=1).mean()
Max Speed
Type
Capitve 210.0
Captive 210.0
Wild 185.0
"""
from pandas.core.groupby.groupby import groupby
Expand Down

0 comments on commit 13deaaf

Please sign in to comment.