@@ -534,7 +534,7 @@ Rolling/Expanding Moments API changes
534
534
``ddof`` argument (with a default value of ``1``) was previously undocumented. (:issue:`8064`)
535
535
536
536
- :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:
538
538
a given result entry will be ``NaN`` if the (expanding, in this case) window does not contain
539
539
at least ``min_periods`` values. The previous behavior was to set to ``NaN`` the ``min_periods`` entries
540
540
starting with the first non- ``NaN`` value. (:issue:`7977`)
@@ -582,11 +582,18 @@ Rolling/Expanding Moments API changes
582
582
ewma(Series([1., None, 8.]), com=2., ignore_na=True) # pre-0.15.0 behavior
583
583
ewma(Series([1., None, 8.]), com=2., ignore_na=False) # new default
584
584
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
+
585
592
- Bug in :func:`expanding_cov`, :func:`expanding_corr`, :func:`rolling_cov`, :func:`rolling_cor`, :func:`ewmcov`, and :func:`ewmcorr`
586
593
returning results with columns sorted by name and producing an error for non-unique columns;
587
594
now handles non-unique columns and returns columns in original order
588
595
(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`)
590
597
- Bug in :func:`rolling_apply` and :func:`expanding_apply` interpreting ``min_periods=0`` as ``min_periods=1`` (:issue:`8080`)
591
598
- Bug in :func:`expanding_std` and :func:`expanding_var` for a single value producing a confusing error message (:issue:`7900`)
592
599
- 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
609
616
610
617
.. code-block:: python
611
618
612
- In [69 ]: ewmvar(s, com=2., bias=False)
613
- Out[69 ]:
619
+ In [89 ]: ewmvar(s, com=2., bias=False)
620
+ Out[89 ]:
614
621
0 -2.775558e-16
615
622
1 3.000000e-01
616
623
2 9.556787e-01
617
624
3 3.585799e+00
618
625
dtype: float64
619
626
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 ]:
622
629
0 1.25
623
630
1 1.25
624
631
2 1.25
0 commit comments