diff --git a/ci/code_checks.sh b/ci/code_checks.sh index bf7423dfe5825..e47dbf2e1cc87 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -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" \ @@ -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" \ diff --git a/pandas/core/arrays/datetimelike.py b/pandas/core/arrays/datetimelike.py index ff8b16b3361ee..ab17ae43215d2 100644 --- a/pandas/core/arrays/datetimelike.py +++ b/pandas/core/arrays/datetimelike.py @@ -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: