@@ -167,9 +167,10 @@ class Grouper(object):
167
167
groupby key, which selects the grouping column of the target
168
168
level : name/number, defaults to None
169
169
the level for the target index
170
- freq : string / freqency object, defaults to None
170
+ freq : string / frequency object, defaults to None
171
171
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>`_.
173
174
axis : number/name of the axis, defaults to 0
174
175
sort : boolean, default to False
175
176
whether to sort the resulting labels
@@ -187,11 +188,19 @@ class Grouper(object):
187
188
188
189
Examples
189
190
--------
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')``
194
193
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))
195
204
"""
196
205
197
206
def __new__ (cls , * args , ** kwargs ):
0 commit comments