From afacf1a5b077a60bdca631292323f33a2a750ed4 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Thu, 7 Apr 2022 11:36:30 -0500 Subject: [PATCH] Backport PR #46674: DOC: generate docs for the `Series.dt.isocalendar()` method. --- doc/source/reference/series.rst | 1 + pandas/core/indexes/accessors.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/source/reference/series.rst b/doc/source/reference/series.rst index a60dab549e66d..fcdc9ea9b95da 100644 --- a/doc/source/reference/series.rst +++ b/doc/source/reference/series.rst @@ -342,6 +342,7 @@ Datetime methods :toctree: api/ :template: autosummary/accessor_method.rst + Series.dt.isocalendar Series.dt.to_period Series.dt.to_pydatetime Series.dt.tz_localize diff --git a/pandas/core/indexes/accessors.py b/pandas/core/indexes/accessors.py index 8c2813f2b57ec..78beda95d4658 100644 --- a/pandas/core/indexes/accessors.py +++ b/pandas/core/indexes/accessors.py @@ -277,12 +277,13 @@ def isocalendar(self): @property def weekofyear(self): """ - The week ordinal of the year. + The week ordinal of the year according to the ISO 8601 standard. .. deprecated:: 1.1.0 - Series.dt.weekofyear and Series.dt.week have been deprecated. - Please use Series.dt.isocalendar().week instead. + Series.dt.weekofyear and Series.dt.week have been deprecated. Please + call :func:`Series.dt.isocalendar` and access the ``week`` column + instead. """ warnings.warn( "Series.dt.weekofyear and Series.dt.week have been deprecated. "