Skip to content

Commit db0426b

Browse files
KeiOshimapmhatre1
authored andcommitted
DOC: fix SA01 error for DatetimeIndex: day_of_year, is_leap_year, inferred_freq (pandas-dev#58406)
* DOC: fix SA01 error for DatetimeIndex: day_of_year, is_leap_year, inferred_freq * fixing line to long error * Fixing: EXPECTED TO FAIL, BUT NOT FAILING errors
1 parent 719e02d commit db0426b

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

ci/code_checks.sh

-8
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
102102
-i "pandas.DataFrame.to_markdown SA01" \
103103
-i "pandas.DataFrame.to_parquet RT03" \
104104
-i "pandas.DataFrame.var PR01,RT03,SA01" \
105-
-i "pandas.DatetimeIndex.day_of_year SA01" \
106-
-i "pandas.DatetimeIndex.dayofyear SA01" \
107105
-i "pandas.DatetimeIndex.freqstr SA01" \
108106
-i "pandas.DatetimeIndex.indexer_at_time PR01,RT03" \
109107
-i "pandas.DatetimeIndex.indexer_between_time RT03" \
110-
-i "pandas.DatetimeIndex.inferred_freq SA01" \
111-
-i "pandas.DatetimeIndex.is_leap_year SA01" \
112108
-i "pandas.DatetimeIndex.snap PR01,RT03" \
113109
-i "pandas.DatetimeIndex.std PR01,RT03" \
114110
-i "pandas.DatetimeIndex.to_period RT03" \
@@ -264,14 +260,11 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
264260
-i "pandas.Series.dt.ceil PR01,PR02" \
265261
-i "pandas.Series.dt.components SA01" \
266262
-i "pandas.Series.dt.day_name PR01,PR02" \
267-
-i "pandas.Series.dt.day_of_year SA01" \
268-
-i "pandas.Series.dt.dayofyear SA01" \
269263
-i "pandas.Series.dt.days SA01" \
270264
-i "pandas.Series.dt.days_in_month SA01" \
271265
-i "pandas.Series.dt.daysinmonth SA01" \
272266
-i "pandas.Series.dt.floor PR01,PR02" \
273267
-i "pandas.Series.dt.freq GL08" \
274-
-i "pandas.Series.dt.is_leap_year SA01" \
275268
-i "pandas.Series.dt.microseconds SA01" \
276269
-i "pandas.Series.dt.month_name PR01,PR02" \
277270
-i "pandas.Series.dt.nanoseconds SA01" \
@@ -400,7 +393,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
400393
-i "pandas.TimedeltaIndex.as_unit RT03,SA01" \
401394
-i "pandas.TimedeltaIndex.components SA01" \
402395
-i "pandas.TimedeltaIndex.days SA01" \
403-
-i "pandas.TimedeltaIndex.inferred_freq SA01" \
404396
-i "pandas.TimedeltaIndex.microseconds SA01" \
405397
-i "pandas.TimedeltaIndex.nanoseconds SA01" \
406398
-i "pandas.TimedeltaIndex.seconds SA01" \

pandas/core/arrays/datetimelike.py

+5
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,11 @@ def inferred_freq(self) -> str | None:
908908
909909
Returns None if it can't autodetect the frequency.
910910
911+
See Also
912+
--------
913+
DatetimeIndex.freqstr : Return the frequency object as a string if it's set,
914+
otherwise None.
915+
911916
Examples
912917
--------
913918
For DatetimeIndex:

pandas/core/arrays/datetimes.py

+12
Original file line numberDiff line numberDiff line change
@@ -1835,6 +1835,11 @@ def isocalendar(self) -> DataFrame:
18351835
"""
18361836
The ordinal day of the year.
18371837
1838+
See Also
1839+
--------
1840+
DatetimeIndex.dayofweek : The day of the week with Monday=0, Sunday=6.
1841+
DatetimeIndex.day : The day of the datetime.
1842+
18381843
Examples
18391844
--------
18401845
For Series:
@@ -2155,6 +2160,13 @@ def isocalendar(self) -> DataFrame:
21552160
Series or ndarray
21562161
Booleans indicating if dates belong to a leap year.
21572162
2163+
See Also
2164+
--------
2165+
DatetimeIndex.is_year_end : Indicate whether the date is the
2166+
last day of the year.
2167+
DatetimeIndex.is_year_start : Indicate whether the date is the first
2168+
day of a year.
2169+
21582170
Examples
21592171
--------
21602172
This method is available on Series with datetime values under

0 commit comments

Comments
 (0)