Skip to content

Commit

Permalink
DOC: Fix pandas.Series.dt seconds, nanoseconds GL08, SA01 (#59582)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
KatsiarynaDzibrova authored Sep 9, 2024
1 parent 871703d commit 47b56ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,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 @@ -111,8 +109,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

0 comments on commit 47b56ea

Please sign in to comment.