From 31ff729810f81aed00992cd71b19c10fcd379ac5 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Fri, 30 Aug 2024 14:40:02 +0530 Subject: [PATCH] DOC: fix SA01,ES01 for pandas.Period.freqstr --- ci/code_checks.sh | 1 - pandas/_libs/tslibs/period.pyx | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 9012dc6559a13..4b9c435b1aa43 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -74,7 +74,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.NA SA01" \ -i "pandas.NaT SA01" \ -i "pandas.Period.freq GL08" \ - -i "pandas.Period.freqstr SA01" \ -i "pandas.Period.ordinal GL08" \ -i "pandas.Period.strftime PR01,SA01" \ -i "pandas.Period.to_timestamp SA01" \ diff --git a/pandas/_libs/tslibs/period.pyx b/pandas/_libs/tslibs/period.pyx index 4f5dfc75a20bf..b3f06565c7789 100644 --- a/pandas/_libs/tslibs/period.pyx +++ b/pandas/_libs/tslibs/period.pyx @@ -2607,6 +2607,17 @@ cdef class _Period(PeriodMixin): """ Return a string representation of the frequency. + This property provides the frequency string associated with the `Period` + object. The frequency string describes the granularity of the time span + represented by the `Period`. Common frequency strings include 'D' for + daily, 'M' for monthly, 'Y' for yearly, etc. + + See Also + -------- + Period.asfreq : Convert Period to desired frequency, at the start or end + of the interval. + period_range : Return a fixed frequency PeriodIndex. + Examples -------- >>> pd.Period('2020-01', 'D').freqstr