Skip to content

DOC: fix SA01,ES01 for pandas.PeriodDtype.freq #59796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
-i "pandas.Period.freq GL08" \
-i "pandas.Period.ordinal GL08" \
-i "pandas.PeriodDtype.freq SA01" \
-i "pandas.RangeIndex.from_range PR01,SA01" \
-i "pandas.RangeIndex.step SA01" \
-i "pandas.Series.cat.add_categories PR01,PR02" \
Expand Down
14 changes: 14 additions & 0 deletions pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,20 @@ def freq(self) -> BaseOffset:
"""
The frequency object of this PeriodDtype.

The `freq` property returns the `BaseOffset` object that represents the
frequency of the PeriodDtype. This frequency specifies the interval (e.g.,
daily, monthly, yearly) associated with the Period type. It is essential
for operations that depend on time-based calculations within a period index
or series.

See Also
--------
Period : Represents a period of time.
PeriodIndex : Immutable ndarray holding ordinal values indicating
regular periods.
PeriodDtype : An ExtensionDtype for Period data.
date_range : Return a fixed frequency range of dates.

Examples
--------
>>> dtype = pd.PeriodDtype(freq="D")
Expand Down
Loading