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
Copy file name to clipboardExpand all lines: doc/source/timeseries.rst
+1
Original file line number
Diff line number
Diff line change
@@ -560,6 +560,7 @@ There are several time/date properties that one can access from ``Timestamp`` or
560
560
is_quarter_end,"Logical indicating if last day of quarter (defined by frequency)"
561
561
is_year_start,"Logical indicating if first day of year (defined by frequency)"
562
562
is_year_end,"Logical indicating if last day of year (defined by frequency)"
563
+
is_leap_year,"Logical indicating if the date belongs to a leap year"
563
564
564
565
Furthermore, if you have a ``Series`` with datetimelike values, then you can access these properties via the ``.dt`` accessor, see the :ref:`docs <basics.dt_accessors>`
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.19.0.txt
+5-1
Original file line number
Diff line number
Diff line change
@@ -347,6 +347,8 @@ API changes
347
347
- ``astype()`` will now accept a dict of column name to data types mapping as the ``dtype`` argument. (:issue:`12086`)
348
348
- The ``pd.read_json`` and ``DataFrame.to_json`` has gained support for reading and writing json lines with ``lines`` option see :ref:`Line delimited json <io.jsonl>` (:issue:`9180`)
349
349
- ``pd.Timedelta(None)`` is now accepted and will return ``NaT``, mirroring ``pd.Timestamp`` (:issue:`13687`)
350
+
- ``Timestamp``, ``Period``, ``DatetimeIndex``, ``PeriodIndex`` and ``.dt`` accessor have ``.is_leap_year`` property to check whether the date belongs to a leap year. (:issue:`13727`)
351
+
350
352
351
353
.. _whatsnew_0190.api.tolist:
352
354
@@ -609,7 +611,9 @@ Deprecations
609
611
- ``as_recarray`` has been deprecated in ``pd.read_csv()`` and will be removed in a future version (:issue:`13373`)
610
612
- top-level ``pd.ordered_merge()`` has been renamed to ``pd.merge_ordered()`` and the original name will be removed in a future version (:issue:`13358`)
611
613
- ``Timestamp.offset`` property (and named arg in the constructor), has been deprecated in favor of ``freq`` (:issue:`12160`)
612
-
- ``pivot_annual`` is deprecated. Use ``pivot_table`` as alternative, an example is :ref:`here <cookbook.pivot>` (:issue:`736`)
614
+
- ``pd.tseries.util.pivot_annual`` is deprecated. Use ``pivot_table`` as alternative, an example is :ref:`here <cookbook.pivot>` (:issue:`736`)
615
+
- ``pd.tseries.util.isleapyear`` has been deprecated and will be removed in a subsequent release. Datetime-likes now have a ``.is_leap_year`` property. (:issue:`13727`)
0 commit comments