Skip to content

Commit 5058224

Browse files
committed
Merge pull request #8567 from seth-p/ignore_na_warning
DOC: ignore_na warning
2 parents 5cd1bed + f97c1d9 commit 5058224

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

doc/source/v0.15.0.txt

+13-6
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ Rolling/Expanding Moments API changes
534534
``ddof`` argument (with a default value of ``1``) was previously undocumented. (:issue:`8064`)
535535

536536
- :func:`ewma`, :func:`ewmstd`, :func:`ewmvol`, :func:`ewmvar`, :func:`ewmcov`, and :func:`ewmcorr`
537-
now interpret ``min_periods`` in the same manner that the ``rolling_*`` and ``expanding_*`` functions do:
537+
now interpret ``min_periods`` in the same manner that the :func:`rolling_*()` and :func:`expanding_*()` functions do:
538538
a given result entry will be ``NaN`` if the (expanding, in this case) window does not contain
539539
at least ``min_periods`` values. The previous behavior was to set to ``NaN`` the ``min_periods`` entries
540540
starting with the first non- ``NaN`` value. (:issue:`7977`)
@@ -582,11 +582,18 @@ Rolling/Expanding Moments API changes
582582
ewma(Series([1., None, 8.]), com=2., ignore_na=True) # pre-0.15.0 behavior
583583
ewma(Series([1., None, 8.]), com=2., ignore_na=False) # new default
584584

585+
.. warning::
586+
587+
By default (``ignore_na=False``) the :func:`ewm*()` functions' weights calculation
588+
in the presence of missing values is different than in pre-0.15.0 versions.
589+
To reproduce the pre-0.15.0 calculation of weights in the presence of missing values
590+
one must specify explicitly ``ignore_na=True``.
591+
585592
- Bug in :func:`expanding_cov`, :func:`expanding_corr`, :func:`rolling_cov`, :func:`rolling_cor`, :func:`ewmcov`, and :func:`ewmcorr`
586593
returning results with columns sorted by name and producing an error for non-unique columns;
587594
now handles non-unique columns and returns columns in original order
588595
(except for the case of two DataFrames with ``pairwise=False``, where behavior is unchanged) (:issue:`7542`)
589-
- Bug in :func:`rolling_count` and ``expanding_*`` functions unnecessarily producing error message for zero-length data (:issue:`8056`)
596+
- Bug in :func:`rolling_count` and :func:`expanding_*()` functions unnecessarily producing error message for zero-length data (:issue:`8056`)
590597
- Bug in :func:`rolling_apply` and :func:`expanding_apply` interpreting ``min_periods=0`` as ``min_periods=1`` (:issue:`8080`)
591598
- Bug in :func:`expanding_std` and :func:`expanding_var` for a single value producing a confusing error message (:issue:`7900`)
592599
- Bug in :func:`rolling_std` and :func:`rolling_var` for a single value producing ``0`` rather than ``NaN`` (:issue:`7900`)
@@ -609,16 +616,16 @@ Rolling/Expanding Moments API changes
609616

610617
.. code-block:: python
611618

612-
In [69]: ewmvar(s, com=2., bias=False)
613-
Out[69]:
619+
In [89]: ewmvar(s, com=2., bias=False)
620+
Out[89]:
614621
0 -2.775558e-16
615622
1 3.000000e-01
616623
2 9.556787e-01
617624
3 3.585799e+00
618625
dtype: float64
619626

620-
In [70]: ewmvar(s, com=2., bias=False) / ewmvar(s, com=2., bias=True)
621-
Out[70]:
627+
In [90]: ewmvar(s, com=2., bias=False) / ewmvar(s, com=2., bias=True)
628+
Out[90]:
622629
0 1.25
623630
1 1.25
624631
2 1.25

0 commit comments

Comments
 (0)