diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 101d650a0e768..7c97408cee559 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -102,13 +102,9 @@ 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.day_of_year SA01" \ - -i "pandas.DatetimeIndex.dayofyear SA01" \ -i "pandas.DatetimeIndex.freqstr SA01" \ -i "pandas.DatetimeIndex.indexer_at_time PR01,RT03" \ -i "pandas.DatetimeIndex.indexer_between_time RT03" \ - -i "pandas.DatetimeIndex.inferred_freq SA01" \ - -i "pandas.DatetimeIndex.is_leap_year SA01" \ -i "pandas.DatetimeIndex.snap PR01,RT03" \ -i "pandas.DatetimeIndex.std PR01,RT03" \ -i "pandas.DatetimeIndex.to_period RT03" \ @@ -264,14 +260,11 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.dt.ceil PR01,PR02" \ -i "pandas.Series.dt.components SA01" \ -i "pandas.Series.dt.day_name PR01,PR02" \ - -i "pandas.Series.dt.day_of_year SA01" \ - -i "pandas.Series.dt.dayofyear SA01" \ -i "pandas.Series.dt.days SA01" \ -i "pandas.Series.dt.days_in_month SA01" \ -i "pandas.Series.dt.daysinmonth SA01" \ -i "pandas.Series.dt.floor PR01,PR02" \ -i "pandas.Series.dt.freq GL08" \ - -i "pandas.Series.dt.is_leap_year SA01" \ -i "pandas.Series.dt.microseconds SA01" \ -i "pandas.Series.dt.month_name PR01,PR02" \ -i "pandas.Series.dt.nanoseconds SA01" \ @@ -400,7 +393,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.TimedeltaIndex.as_unit RT03,SA01" \ -i "pandas.TimedeltaIndex.components SA01" \ -i "pandas.TimedeltaIndex.days SA01" \ - -i "pandas.TimedeltaIndex.inferred_freq SA01" \ -i "pandas.TimedeltaIndex.microseconds SA01" \ -i "pandas.TimedeltaIndex.nanoseconds SA01" \ -i "pandas.TimedeltaIndex.seconds SA01" \ diff --git a/pandas/core/arrays/datetimelike.py b/pandas/core/arrays/datetimelike.py index 974289160b145..ff8b16b3361ee 100644 --- a/pandas/core/arrays/datetimelike.py +++ b/pandas/core/arrays/datetimelike.py @@ -908,6 +908,11 @@ def inferred_freq(self) -> str | None: Returns None if it can't autodetect the frequency. + See Also + -------- + DatetimeIndex.freqstr : Return the frequency object as a string if it's set, + otherwise None. + Examples -------- For DatetimeIndex: diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index be087e19ce7b6..25c7f926d19a8 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -1835,6 +1835,11 @@ def isocalendar(self) -> DataFrame: """ The ordinal day of the year. + See Also + -------- + DatetimeIndex.dayofweek : The day of the week with Monday=0, Sunday=6. + DatetimeIndex.day : The day of the datetime. + Examples -------- For Series: @@ -2155,6 +2160,13 @@ def isocalendar(self) -> DataFrame: Series or ndarray Booleans indicating if dates belong to a leap year. + See Also + -------- + DatetimeIndex.is_year_end : Indicate whether the date is the + last day of the year. + DatetimeIndex.is_year_start : Indicate whether the date is the first + day of a year. + Examples -------- This method is available on Series with datetime values under