Skip to content

Commit 74d36ac

Browse files
authored
Fix docstring Timedelta.to_timedelta64 SA01, Timedelta.total_seconds 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
1 parent 1baec15 commit 74d36ac

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pandas/_libs/tslibs/nattype.pyx

+2
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ class NaTType(_NaT):
500500
--------
501501
to_timedelta : Convert argument to timedelta.
502502
Timedelta : Represents a duration, the difference between two dates or times.
503+
Timedelta.seconds : Returns the seconds component of the timedelta.
504+
Timedelta.microseconds : Returns the microseconds component of the timedelta.
503505
504506
Examples
505507
--------

pandas/_libs/tslibs/timedeltas.pyx

+3
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,8 @@ cdef class _Timedelta(timedelta):
11961196
--------
11971197
to_timedelta : Convert argument to timedelta.
11981198
Timedelta : Represents a duration, the difference between two dates or times.
1199+
Timedelta.seconds : Returns the seconds component of the timedelta.
1200+
Timedelta.microseconds : Returns the microseconds component of the timedelta.
11991201

12001202
Examples
12011203
--------
@@ -1493,6 +1495,7 @@ cdef class _Timedelta(timedelta):
14931495
14941496
See Also
14951497
--------
1498+
Timedelta.asm8 : Return a numpy timedelta64 array scalar view.
14961499
numpy.ndarray.view : Returns a view of an array with the same data.
14971500
Timedelta.to_numpy : Converts the Timedelta to a NumPy timedelta64.
14981501
Timedelta.total_seconds : Returns the total duration of the Timedelta

0 commit comments

Comments
 (0)