Skip to content

Commit 71f7036

Browse files
author
tp
committed
Remove pd.rolling_*, pd.expanding_* and pd.ewm*
1 parent 265e327 commit 71f7036

File tree

10 files changed

+65
-1394
lines changed

10 files changed

+65
-1394
lines changed

doc/source/computation.rst

+1-8
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,12 @@ Window Functions
200200

201201
.. currentmodule:: pandas.core.window
202202

203-
.. warning::
204-
205-
Prior to version 0.18.0, ``pd.rolling_*``, ``pd.expanding_*``, and ``pd.ewm*`` were module level
206-
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.
207-
208-
The deprecation warning will show the new syntax, see an example :ref:`here <whatsnew_0180.window_deprecations>`
209-
210203
For working with data, a number of windows functions are provided for
211204
computing common *window* or *rolling* statistics. Among these are count, sum,
212205
mean, median, correlation, variance, covariance, standard deviation, skewness,
213206
and kurtosis.
214207

215-
Starting in version 0.18.1, the ``rolling()`` and ``expanding()``
208+
The ``rolling()`` and ``expanding()``
216209
functions can be used directly from DataFrameGroupBy objects,
217210
see the :ref:`groupby docs <groupby.transform.window_resample>`.
218211

doc/source/whatsnew/v0.22.0.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ Removal of prior version deprecations/changes
217217
- The ``pandas.io.wb`` and ``pandas.io.data`` stub modules have been removed (:issue:`13735`)
218218
- ``Categorical.from_array`` has been removed (:issue:`13854`)
219219
- The ``freq`` and ``how`` parameters have been removed from the ``rolling``/``expanding``/``ewm`` methods of DataFrame
220-
and Series (deprecated since v0.18). Instead, resample before calling the methods. (:issue:18601 & :issue:18668)
220+
and Series (deprecated since v0.18). Instead, resample before calling the methods. (:issue:`18601` & :issue:`18668`)
221+
- The ``rolling_*``, ``expanding_*`` and ``ewm*`` functions have been removed (deprecated 0.18). Use the corresponding
222+
methods on GroupBy objects (:issue:`18723`).
221223
- ``DatetimeIndex.to_datetime``, ``Timestamp.to_datetime``, ``PeriodIndex.to_datetime``, and ``Index.to_datetime`` have been removed (:issue:`8254`, :issue:`14096`, :issue:`14113`)
222224
- :func:`read_csv` has dropped the ``skip_footer`` parameter (:issue:`13386`)
223225

expected.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
\begin{longtable}{lrl}
2+
\toprule
3+
{} & a & b \\
4+
\midrule
5+
\endhead
6+
\midrule
7+
\multicolumn{3}{r}{{Continued on next page}} \\
8+
\midrule
9+
\endfoot
10+
11+
\bottomrule
12+
\endlastfoot
13+
0 & 1 & b1 \\
14+
1 & 2 & b2 \\
15+
\end{longtable}

pandas/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141

4242
from pandas.core.api import *
4343
from pandas.core.sparse.api import *
44-
from pandas.stats.api import *
4544
from pandas.tseries.api import *
4645
from pandas.core.computation.api import *
4746
from pandas.core.reshape.api import *

pandas/core/generic.py

+4
Original file line numberDiff line numberDiff line change
@@ -4103,6 +4103,10 @@ def as_matrix(self, columns=None):
41034103
def values(self):
41044104
"""Numpy representation of NDFrame
41054105
4106+
Returns
4107+
-------
4108+
arr : ndarray
4109+
41064110
Notes
41074111
-----
41084112
The dtype will be a lower-common-denominator dtype (implicit

pandas/stats/__init__.py

Whitespace-only changes.

pandas/stats/api.py

-7
This file was deleted.

0 commit comments

Comments
 (0)