Skip to content

DOC: Enforce Numpy Docstring Validation for pandas.DatetimeIndex.freqstr #58309

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 3 commits into from
Apr 25, 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
2 changes: 0 additions & 2 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.DataFrame.to_markdown SA01" \
-i "pandas.DataFrame.to_parquet RT03" \
-i "pandas.DataFrame.var PR01,RT03,SA01" \
-i "pandas.DatetimeIndex.freqstr SA01" \
-i "pandas.DatetimeIndex.indexer_at_time PR01,RT03" \
-i "pandas.DatetimeIndex.indexer_between_time RT03" \
-i "pandas.DatetimeIndex.snap PR01,RT03" \
Expand Down Expand Up @@ -216,7 +215,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.PeriodIndex.dayofyear SA01" \
-i "pandas.PeriodIndex.days_in_month SA01" \
-i "pandas.PeriodIndex.daysinmonth SA01" \
-i "pandas.PeriodIndex.freqstr SA01" \
-i "pandas.PeriodIndex.from_fields PR07,SA01" \
-i "pandas.PeriodIndex.from_ordinals SA01" \
-i "pandas.PeriodIndex.hour SA01" \
Expand Down
5 changes: 5 additions & 0 deletions pandas/core/arrays/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,11 @@ def freqstr(self) -> str | None:
"""
Return the frequency object as a string if it's set, otherwise None.

See Also
--------
DatetimeIndex.inferred_freq : Returns a string representing a frequency
generated by infer_freq.

Examples
--------
For DatetimeIndex:
Expand Down