Skip to content

Commit 47b56ea

Browse files
DOC: Fix pandas.Series.dt seconds, nanoseconds GL08, SA01 (#59582)
* fix pandas.Series.dt.freq * fix seconds, nanoseconds, microseconds * remove fixed objects from code_checks.sh * Remove Timedelta Index checks * fix freq example * remove freq * bring back microseconds
1 parent 871703d commit 47b56ea

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

ci/code_checks.sh

-4
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
9090
-i "pandas.Series.dt.floor PR01,PR02" \
9191
-i "pandas.Series.dt.freq GL08" \
9292
-i "pandas.Series.dt.month_name PR01,PR02" \
93-
-i "pandas.Series.dt.nanoseconds SA01" \
9493
-i "pandas.Series.dt.normalize PR01" \
9594
-i "pandas.Series.dt.round PR01,PR02" \
96-
-i "pandas.Series.dt.seconds SA01" \
9795
-i "pandas.Series.dt.strftime PR01,PR02" \
9896
-i "pandas.Series.dt.to_period PR01,PR02" \
9997
-i "pandas.Series.dt.total_seconds PR01" \
@@ -111,8 +109,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
111109
-i "pandas.Timedelta.resolution PR02" \
112110
-i "pandas.Timedelta.to_timedelta64 SA01" \
113111
-i "pandas.Timedelta.total_seconds SA01" \
114-
-i "pandas.TimedeltaIndex.nanoseconds SA01" \
115-
-i "pandas.TimedeltaIndex.seconds SA01" \
116112
-i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \
117113
-i "pandas.Timestamp.max PR02" \
118114
-i "pandas.Timestamp.min PR02" \

pandas/core/arrays/timedeltas.py

+10
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,11 @@ def to_pytimedelta(self) -> npt.NDArray[np.object_]:
842842
seconds_docstring = textwrap.dedent(
843843
"""Number of seconds (>= 0 and less than 1 day) for each element.
844844
845+
See Also
846+
--------
847+
Series.dt.seconds : Return number of seconds for each element.
848+
Series.dt.nanoseconds : Return number of nanoseconds for each element.
849+
845850
Examples
846851
--------
847852
For Series:
@@ -917,6 +922,11 @@ def to_pytimedelta(self) -> npt.NDArray[np.object_]:
917922
nanoseconds_docstring = textwrap.dedent(
918923
"""Number of nanoseconds (>= 0 and less than 1 microsecond) for each element.
919924
925+
See Also
926+
--------
927+
Series.dt.seconds : Return number of seconds for each element.
928+
Series.dt.microseconds : Return number of nanoseconds for each element.
929+
920930
Examples
921931
--------
922932
For Series:

0 commit comments

Comments
 (0)