You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -244,8 +243,12 @@ accept the following arguments:
244
243
- ``window``: size of moving window
245
244
- ``min_periods``: threshold of non-null data points to require (otherwise
246
245
result is NA)
247
-
- ``freq``: optionally specify a :ref:`frequency string <timeseries.alias>`
248
-
or :ref:`DateOffset <timeseries.offsets>` to pre-conform the data to.
246
+
247
+
.. warning::
248
+
249
+
The ``freq`` and ``how`` arguments were in the API prior to 0.18.0 changes. These are deprecated in the new API. You can simply resample the input prior to creating a window function.
250
+
251
+
For example, instead of ``s.rolling(window=5,freq='D').max()`` to get the max value on a rolling 5 Day window, one could use ``s.resample('D',how='max').rolling(window=5).max()``, which first resamples the data to daily data, then provides a rolling 5 day window.
249
252
250
253
We can then call methods on these ``rolling`` objects. These return like-indexed objects:
251
254
@@ -604,8 +607,6 @@ all accept are:
604
607
- ``min_periods``: threshold of non-null data points to require. Defaults to
605
608
minimum needed to compute statistic. No ``NaNs`` will be output once
606
609
``min_periods`` non-null data points have been seen.
607
-
- ``freq``: optionally specify a :ref:`frequency string <timeseries.alias>`
608
-
or :ref:`DateOffset <timeseries.offsets>` to pre-conform the data to.
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.18.0.txt
+5-1
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,8 @@ users upgrade to this version.
13
13
14
14
Highlights include:
15
15
16
+
- Window functions are now methods on ``.groupby`` like objects, see :ref:`here <whatsnew_0180.moments>`.
17
+
16
18
Check the :ref:`API Changes <whatsnew_0180.api>` and :ref:`deprecations <whatsnew_0180.deprecations>` before updating.
17
19
18
20
.. contents:: What's new in v0.18.0
@@ -212,7 +214,7 @@ Deprecations
212
214
213
215
.. _whatsnew_0180.window_deprecations:
214
216
215
-
- Function ``pd.rolling_*``, ``pd.expanding_*``, and ``pd.ewm*`` are deprecated and replaced by the corresponding method call. Note that
217
+
- The functions ``pd.rolling_*``, ``pd.expanding_*``, and ``pd.ewm*`` are deprecated and replaced by the corresponding method call. Note that
216
218
the new suggested syntax includes all of the arguments (even if default) (:issue:`11603`)
217
219
218
220
.. code-block:: python
@@ -237,6 +239,8 @@ Deprecations
237
239
2 0.5
238
240
dtype: float64
239
241
242
+
- The the ``freq`` and ``how`` arguments to the ``.rolling``, ``.expanding``, and ``.ewm`` (new) functions are deprecated, and will be removed in a future version. (:issue:`11603`)
0 commit comments