Skip to content

Commit

Permalink
Fix docstring Timedelta.to_timedelta64 SA01, Timedelta.total_seconds …
Browse files Browse the repository at this point in the history
…SA01, Timedelta.view SA01 (#59719)

* Add 'See Also' section for Timedelta.to_timedelta64

* Fix SA01 for Timedelta.total_seconds()

* Fix SA01 for Timedelta.view

* Add space

* Fix test_nat_doc_strings

* Revert "Fix test_nat_doc_strings"

This reverts commit 9d09658.

* Match doc of total_seconds method in nattype.pyx
  • Loading branch information
fbourgey authored Sep 30, 2024
1 parent 1baec15 commit 74d36ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pandas/_libs/tslibs/nattype.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@ class NaTType(_NaT):
--------
to_timedelta : Convert argument to timedelta.
Timedelta : Represents a duration, the difference between two dates or times.
Timedelta.seconds : Returns the seconds component of the timedelta.
Timedelta.microseconds : Returns the microseconds component of the timedelta.
Examples
--------
Expand Down
3 changes: 3 additions & 0 deletions pandas/_libs/tslibs/timedeltas.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,8 @@ cdef class _Timedelta(timedelta):
--------
to_timedelta : Convert argument to timedelta.
Timedelta : Represents a duration, the difference between two dates or times.
Timedelta.seconds : Returns the seconds component of the timedelta.
Timedelta.microseconds : Returns the microseconds component of the timedelta.

Examples
--------
Expand Down Expand Up @@ -1493,6 +1495,7 @@ cdef class _Timedelta(timedelta):
See Also
--------
Timedelta.asm8 : Return a numpy timedelta64 array scalar view.
numpy.ndarray.view : Returns a view of an array with the same data.
Timedelta.to_numpy : Converts the Timedelta to a NumPy timedelta64.
Timedelta.total_seconds : Returns the total duration of the Timedelta
Expand Down

0 comments on commit 74d36ac

Please sign in to comment.