@@ -220,7 +220,7 @@ and kurtosis.
220
220
221
221
.. note ::
222
222
223
- The API for window statistics is quite similar to the way one works with ``Groupby `` objects, see the documentation :ref: `here <groupby >`
223
+ The API for window statistics is quite similar to the way one works with ``GroupBy `` objects, see the documentation :ref: `here <groupby >`
224
224
225
225
We work with ``rolling ``, ``expanding `` and ``exponentially weighted `` data through the corresponding
226
226
objects, :class: `~pandas.core.window.Rolling `, :class: `~pandas.core.window.Expanding ` and :class: `~pandas.core.window.EWM `.
@@ -231,7 +231,7 @@ objects, :class:`~pandas.core.window.Rolling`, :class:`~pandas.core.window.Expan
231
231
s = s.cumsum()
232
232
s
233
233
234
- These are created from methods on ``Series `` and ``DataFrames ``.
234
+ These are created from methods on ``Series `` and ``DataFrame ``.
235
235
236
236
.. ipython :: python
237
237
@@ -247,7 +247,7 @@ accept the following arguments:
247
247
- ``freq ``: optionally specify a :ref: `frequency string <timeseries.alias >`
248
248
or :ref: `DateOffset <timeseries.offsets >` to pre-conform the data to.
249
249
250
- We can then call functions on these ``rolling `` objects. Which return like-indexed objects:
250
+ We can then call methods on these ``rolling `` objects. These return like-indexed objects:
251
251
252
252
.. ipython :: python
253
253
@@ -304,8 +304,6 @@ We provide a number of the common statistical functions:
304
304
:meth: `~Rolling.apply `, Generic apply
305
305
:meth: `~Rolling.cov `, Unbiased covariance (binary)
306
306
:meth: `~Rolling.corr `, Correlation (binary)
307
- :meth: `~Window.mean `, Moving window mean function
308
- :meth: `~Window.sum `, Moving window sum function
309
307
310
308
The :meth: `~Rolling.apply ` function takes an extra ``func `` argument and performs
311
309
generic rolling computations. The ``func `` argument should be a single function
@@ -323,9 +321,17 @@ compute the mean absolute deviation on a rolling basis:
323
321
Rolling Windows
324
322
~~~~~~~~~~~~~~~
325
323
326
- The :meth: `~Window.mean `, and :meth: `~Window.sum ` functions perform a generic rolling window computation
327
- on the input data. The weights used in the window are specified by the ``win_type ``
328
- keyword. The list of recognized types are:
324
+ Passing ``win_type `` to ``.rolling `` generates a generic rolling window computation, that is weighted according the ``win_type ``.
325
+ The following methods are available:
326
+
327
+ .. csv-table ::
328
+ :header: "Method", "Description"
329
+ :widths: 20, 80
330
+
331
+ :meth: `~Window.sum `, Sum of values
332
+ :meth: `~Window.mean `, Mean of values
333
+
334
+ The weights used in the window are specified by the ``win_type``keyword. The list of recognized types are:
329
335
330
336
- ``boxcar ``
331
337
- ``triang ``
@@ -484,9 +490,9 @@ We can aggregate by passing a function to the entire DataFrame, or select a Seri
484
490
485
491
r[' A' ].aggregate(np.sum)
486
492
487
- r[' A' ,' B' ].aggregate(np.sum)
493
+ r[[ ' A' ,' B' ] ].aggregate(np.sum)
488
494
489
- As you can see, the result of the aggregation will have the selection columns, or all
495
+ As you can see, the result of the aggregation will have the selected columns, or all
490
496
columns if none are selected.
491
497
492
498
.. _stats.aggregate.multifunc :
@@ -531,7 +537,7 @@ columns of a DataFrame:
531
537
' B' : lambda x : np.std(x, ddof = 1 )})
532
538
533
539
The function names can also be strings. In order for a string to be valid it
534
- must be either implemented on the Windowed object
540
+ must be implemented on the Windowed object
535
541
536
542
.. ipython :: python
537
543
0 commit comments