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
make sure .resample(...).plot() warns and returns a correct plotting object
make sure that .groupby(...).resample(....) is hitting warnings when appropriate
closes#12448
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.18.0.txt
+24-1
Original file line number
Diff line number
Diff line change
@@ -705,7 +705,7 @@ other anchored offsets like ``MonthBegin`` and ``YearBegin``.
705
705
Resample API
706
706
^^^^^^^^^^^^
707
707
708
-
Like the change in the window functions API :ref:`above <whatsnew_0180.enhancements.moments>`, ``.resample(...)`` is changing to have a more groupby-like API. (:issue:`11732`, :issue:`12702`, :issue:`12202`, :issue:`12332`, :issue:`12334`, :issue:`12348`).
708
+
Like the change in the window functions API :ref:`above <whatsnew_0180.enhancements.moments>`, ``.resample(...)`` is changing to have a more groupby-like API. (:issue:`11732`, :issue:`12702`, :issue:`12202`, :issue:`12332`, :issue:`12334`, :issue:`12348`, :issue:`12448`).
709
709
710
710
.. ipython:: python
711
711
@@ -774,6 +774,29 @@ You could also specify a ``how`` directly
774
774
use .resample(...).mean() instead of .resample(...)
775
775
assignment will have no effect as you are working on a copy
776
776
777
+
There is a situation where the new API can not perform all the operations when using original code.
778
+
This code is intending to resample every 2s, take the ``mean`` AND then take the ``min` of those results.
779
+
780
+
.. code-block:: python
781
+
782
+
In [4]: df.resample('2s').min()
783
+
Out[4]:
784
+
A 0.433985
785
+
B 0.314582
786
+
C 0.357096
787
+
D 0.531096
788
+
dtype: float64
789
+
790
+
The new API will:
791
+
792
+
.. ipython: python
793
+
794
+
df.resample('2s').min()
795
+
796
+
Good news is the return dimensions will differ (between the new API and the old API), so this should loudly raise
797
+
an exception.
798
+
799
+
777
800
**New API**:
778
801
779
802
Now, you can write ``.resample`` as a 2-stage operation like groupby, which
0 commit comments