Skip to content

DOC: Fix pandas.Series.dt seconds, nanoseconds GL08, SA01 #59582

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 8 commits into from
Sep 9, 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
4 changes: 0 additions & 4 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.dt.floor PR01,PR02" \
-i "pandas.Series.dt.freq GL08" \
-i "pandas.Series.dt.month_name PR01,PR02" \
-i "pandas.Series.dt.nanoseconds SA01" \
-i "pandas.Series.dt.normalize PR01" \
-i "pandas.Series.dt.round PR01,PR02" \
-i "pandas.Series.dt.seconds SA01" \
-i "pandas.Series.dt.strftime PR01,PR02" \
-i "pandas.Series.dt.to_period PR01,PR02" \
-i "pandas.Series.dt.total_seconds PR01" \
Expand All @@ -113,8 +111,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Timedelta.resolution PR02" \
-i "pandas.Timedelta.to_timedelta64 SA01" \
-i "pandas.Timedelta.total_seconds SA01" \
-i "pandas.TimedeltaIndex.nanoseconds SA01" \
-i "pandas.TimedeltaIndex.seconds SA01" \
-i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \
-i "pandas.Timestamp.max PR02" \
-i "pandas.Timestamp.min PR02" \
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/arrays/timedeltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,11 @@ def to_pytimedelta(self) -> npt.NDArray[np.object_]:
seconds_docstring = textwrap.dedent(
"""Number of seconds (>= 0 and less than 1 day) for each element.

See Also
--------
Series.dt.seconds : Return number of seconds for each element.
Series.dt.nanoseconds : Return number of nanoseconds for each element.

Examples
--------
For Series:
Expand Down Expand Up @@ -917,6 +922,11 @@ def to_pytimedelta(self) -> npt.NDArray[np.object_]:
nanoseconds_docstring = textwrap.dedent(
"""Number of nanoseconds (>= 0 and less than 1 microsecond) for each element.

See Also
--------
Series.dt.seconds : Return number of seconds for each element.
Series.dt.microseconds : Return number of nanoseconds for each element.

Examples
--------
For Series:
Expand Down