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
API: PeriodIndex.values now return array of Period objects
split from #13941 (comment)
Author: sinhrks <[email protected]>
Closes#13988 from sinhrks/period_values and squashes the following commits:
d7637c9 [sinhrks] API: PeriodIndex.values now return array of Period objects
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.19.0.txt
+22-4
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Highlights include:
16
16
- :func:`merge_asof` for asof-style time-series joining, see :ref:`here <whatsnew_0190.enhancements.asof_merge>`
17
17
- ``.rolling()`` are now time-series aware, see :ref:`here <whatsnew_0190.enhancements.rolling_ts>`
18
18
- pandas development api, see :ref:`here <whatsnew_0190.dev_api>`
19
-
- ``PeriodIndex`` now has its own ``period`` dtype. see ref:`here <whatsnew_0190.api.perioddtype>`
19
+
- ``PeriodIndex`` now has its own ``period`` dtype, and changed to be more consistent with other ``Index`` classes. See ref:`here <whatsnew_0190.api.period>`
20
20
21
21
.. contents:: What's new in v0.19.0
22
22
:local:
@@ -643,10 +643,13 @@ Furthermore:
643
643
- Passing duplicated ``percentiles`` will now raise a ``ValueError``.
644
644
- Bug in ``.describe()`` on a DataFrame with a mixed-dtype column index, which would previously raise a ``TypeError`` (:issue:`13288`)
645
645
646
-
.. _whatsnew_0190.api.perioddtype:
646
+
.. _whatsnew_0190.api.period:
647
+
648
+
``Period`` changes
649
+
^^^^^^^^^^^^^^^^^^
647
650
648
651
``PeriodIndex`` now has ``period`` dtype
649
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
652
+
""""""""""""""""""""""""""""""""""""""""
650
653
651
654
``PeriodIndex`` now has its own ``period`` dtype. The ``period`` dtype is a
652
655
pandas extension dtype like ``category`` or :ref:`timezone aware dtype <timeseries.timezone_series>` (``datetime64[ns, tz]``). (:issue:`13941`).
@@ -681,7 +684,7 @@ New Behavior:
681
684
.. _whatsnew_0190.api.periodnat:
682
685
683
686
``Period('NaT')`` now returns ``pd.NaT``
684
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
687
+
""""""""""""""""""""""""""""""""""""""""
685
688
686
689
Previously, ``Period`` has its own ``Period('NaT')`` representation different from ``pd.NaT``. Now ``Period('NaT')`` has been changed to return ``pd.NaT``. (:issue:`12759`, :issue:`13582`)
687
690
@@ -719,6 +722,21 @@ New Behavior:
719
722
pd.NaT + 1
720
723
pd.NaT - 1
721
724
725
+
``PeriodIndex.values`` now returns array of ``Period`` object
0 commit comments