Skip to content

Commit e3bcd10

Browse files
DOC: fix SA01,ES01 for pandas.PeriodDtype.freq (pandas-dev#59796)
1 parent 695dbde commit e3bcd10

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7272
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
7373
-i "pandas.Period.freq GL08" \
7474
-i "pandas.Period.ordinal GL08" \
75-
-i "pandas.PeriodDtype.freq SA01" \
7675
-i "pandas.RangeIndex.from_range PR01,SA01" \
7776
-i "pandas.RangeIndex.step SA01" \
7877
-i "pandas.Series.cat.add_categories PR01,PR02" \

pandas/core/dtypes/dtypes.py

+14
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,20 @@ def freq(self) -> BaseOffset:
10651065
"""
10661066
The frequency object of this PeriodDtype.
10671067
1068+
The `freq` property returns the `BaseOffset` object that represents the
1069+
frequency of the PeriodDtype. This frequency specifies the interval (e.g.,
1070+
daily, monthly, yearly) associated with the Period type. It is essential
1071+
for operations that depend on time-based calculations within a period index
1072+
or series.
1073+
1074+
See Also
1075+
--------
1076+
Period : Represents a period of time.
1077+
PeriodIndex : Immutable ndarray holding ordinal values indicating
1078+
regular periods.
1079+
PeriodDtype : An ExtensionDtype for Period data.
1080+
date_range : Return a fixed frequency range of dates.
1081+
10681082
Examples
10691083
--------
10701084
>>> dtype = pd.PeriodDtype(freq="D")

0 commit comments

Comments
 (0)