Skip to content

Commit c02756a

Browse files
committed
DOC: some doc corrections
1 parent 2a1d9f2 commit c02756a

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

doc/source/computation.rst

+11-4
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,12 @@ parameter:
201201
Window Functions
202202
----------------
203203

204+
.. currentmodule:: pandas.core.window
205+
204206
.. warning::
205207

206208
Prior to version 0.18.0, ``pd.rolling_*``, ``pd.expanding_*``, and ``pd.ewm*`` were module level
207-
functions and are now deprecated and replaced by the corresponding method call.
209+
functions and are now deprecated. These are replaced by using the :class:`~pandas.core.window.Rolling`, :class:`~pandas.core.window.Expanding` and :class:`~pandas.core.window.EWM`. objects and a corresponding method call.
208210

209211
The deprecation warning will show the new syntax, see an example :ref:`here <whatsnew_0180.window_deprecations>`
210212
You can view the previous documentation
@@ -215,8 +217,6 @@ computing common *window* or *rolling* statistics. Among these are count, sum,
215217
mean, median, correlation, variance, covariance, standard deviation, skewness,
216218
and kurtosis.
217219

218-
.. currentmodule:: pandas.core.window
219-
220220
.. note::
221221

222222
The API for window statistics is quite similar to the way one works with ``GroupBy`` objects, see the documentation :ref:`here <groupby>`
@@ -237,6 +237,14 @@ These are created from methods on ``Series`` and ``DataFrame``.
237237
r = s.rolling(window=60)
238238
r
239239
240+
These object provide tab-completion of the avaible methods and properties.
241+
242+
.. code-block:: python
243+
244+
In [14]: r.
245+
r.agg r.apply r.count r.exclusions r.max r.median r.name r.skew r.sum
246+
r.aggregate r.corr r.cov r.kurt r.mean r.min r.quantile r.std r.var
247+
240248
Generally these methods all have the same interface. They all
241249
accept the following arguments:
242250

@@ -390,7 +398,6 @@ Centering Windows
390398

391399
By default the labels are set to the right edge of the window, but a
392400
``center`` keyword is available so the labels can be set at the center.
393-
This keyword is available in other rolling functions as well.
394401

395402
.. ipython:: python
396403

doc/source/whatsnew/v0.18.0.txt

+12-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ users upgrade to this version.
1313

1414
Highlights include:
1515

16-
- Window functions are now methods on ``.groupby`` like objects, see :ref:`here <whatsnew_0180.moments>`.
16+
- Window functions are now methods on ``.groupby`` like objects, see :ref:`here <whatsnew_0180.enhancements.moments>`.
1717

1818
Check the :ref:`API Changes <whatsnew_0180.api>` and :ref:`deprecations <whatsnew_0180.deprecations>` before updating.
1919

@@ -45,6 +45,8 @@ Previous Behavior:
4545
.. code-block:: python
4646

4747
In [8]: pd.rolling_mean(df,window=3)
48+
FutureWarning: pd.rolling_mean is deprecated for DataFrame and will be removed in a future version, replace with
49+
DataFrame.rolling(window=3,center=False).mean()
4850
Out[8]:
4951
A B
5052
0 NaN NaN
@@ -64,13 +66,20 @@ New Behavior:
6466

6567
r = df.rolling(window=3)
6668

67-
These show a descriptive repr, with tab-completion of available methods
69+
These show a descriptive repr
6870

6971
.. ipython:: python
7072

7173
r
74+
with tab-completion of available methods and properties.
7275

73-
The methods operate on this ``Rolling`` object itself
76+
.. code-block:: python
77+
78+
In [9]: r.
79+
r.A r.agg r.apply r.count r.exclusions r.max r.median r.name r.skew r.sum
80+
r.B r.aggregate r.corr r.cov r.kurt r.mean r.min r.quantile r.std r.var
81+
82+
The methods operate on the ``Rolling`` object itself
7483

7584
.. ipython:: python
7685

0 commit comments

Comments
 (0)