#NEWLINE# def aggregate( self , arg , * args , **kwargs ) : #NEWLINE# #INDENT# "\n        Apply aggregation function or functions to resampled groups, yielding\n        most likely Series but in some cases DataFrame depending on the output\n        of the aggregation function\n\n        Parameters\n        ----------\n        func_or_funcs : function or list / dict of functions\n            List/dict of functions will produce DataFrame with column names\n            determined by the function names themselves (list) or the keys in\n            the dict\n\n        Notes\n        -----\n        agg is an alias for aggregate. Use it.\n\n        Examples\n        --------\n        >>> s = Series([1,2,3,4,5],\n                        index=pd.date_range('20130101',\n                                            periods=5,freq='s'))\n        2013-01-01 00:00:00    1\n        2013-01-01 00:00:01    2\n        2013-01-01 00:00:02    3\n        2013-01-01 00:00:03    4\n        2013-01-01 00:00:04    5\n        Freq: S, dtype: int64\n\n        >>> r = s.resample('2s')\n        DatetimeIndexResampler [freq=<2 * Seconds>, axis=0, closed=left,\n                                label=left, convention=start, base=0]\n\n        >>> r.agg(np.sum)\n        2013-01-01 00:00:00    3\n        2013-01-01 00:00:02    7\n        2013-01-01 00:00:04    5\n        Freq: 2S, dtype: int64\n\n        >>> r.agg(['sum','mean','max'])\n                             sum  mean  max\n        2013-01-01 00:00:00    3   1.5    2\n        2013-01-01 00:00:02    7   3.5    4\n        2013-01-01 00:00:04    5   5.0    5\n\n        >>> r.agg({'result' : lambda x: x.mean() / x.std(),\n                   'total' : np.sum})\n                             total    result\n        2013-01-01 00:00:00      3  2.121320\n        2013-01-01 00:00:02      7  4.949747\n        2013-01-01 00:00:04      5       NaN\n\n        See also\n        --------\n        transform\n\n        Returns\n        -------\n        Series or DataFrame\n        " #NEWLINE# self . _set_binner ( ) #NEWLINE# ( result , how ) = self . _aggregate ( arg , * args , ** kwargs ) #NEWLINE# if ( result is None ) : #NEWLINE# #INDENT# return self . _groupby_and_aggregate ( arg , * args , ** kwargs ) #NEWLINE# #UNINDENT# return result