Skip to content

Commit 1eeeded

Browse files
committed
DOC: 9789 Added missing letter, added link, fixed examples formatting
DOC 9798: Fixed link and examples formatting Fixed for PEP8 compliance
1 parent 5c906ff commit 1eeeded

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

pandas/core/groupby.py

+15-6
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,10 @@ class Grouper(object):
167167
groupby key, which selects the grouping column of the target
168168
level : name/number, defaults to None
169169
the level for the target index
170-
freq : string / freqency object, defaults to None
170+
freq : string / frequency object, defaults to None
171171
This will groupby the specified frequency if the target selection (via key or level) is
172-
a datetime-like object
172+
a datetime-like object. For full specification of available frequencies, please see
173+
`here <http://pandas.pydata.org/pandas-docs/stable/timeseries.html>`_.
173174
axis : number/name of the axis, defaults to 0
174175
sort : boolean, default to False
175176
whether to sort the resulting labels
@@ -187,11 +188,19 @@ class Grouper(object):
187188
188189
Examples
189190
--------
190-
>>> df.groupby(Grouper(key='A')) : syntactic sugar for df.groupby('A')
191-
>>> df.groupby(Grouper(key='date',freq='60s')) : specify a resample on the column 'date'
192-
>>> df.groupby(Grouper(level='date',freq='60s',axis=1)) :
193-
specify a resample on the level 'date' on the columns axis with a frequency of 60s
191+
192+
Syntactic sugar for ``df.groupby('A')``
194193
194+
>>> df.groupby(Grouper(key='A'))
195+
196+
Specify a resample operation on the column 'date'
197+
198+
>>> df.groupby(Grouper(key='date', freq='60s'))
199+
200+
Specify a resample operation on the level 'date' on the columns axis
201+
with a frequency of 60s
202+
203+
>>> df.groupby(Grouper(level='date', freq='60s', axis=1))
195204
"""
196205

197206
def __new__(cls, *args, **kwargs):

0 commit comments

Comments
 (0)