@@ -817,20 +817,74 @@ def to_pytimedelta(self) -> npt.NDArray[np.object_]:
817817 dtype: int64"""
818818 )
819819 days = _field_accessor ("days" , "days" , days_docstring )
820+
821+ seconds_docstring = textwrap .dedent (
822+ """Number of seconds (>= 0 and less than 1 day) for each element.
823+
824+ Examples
825+ --------
826+ >>> ser = pd.Series(pd.to_timedelta([1, 2, 3], unit='S'))
827+ >>> ser
828+ 0 0 days 00:00:01
829+ 1 0 days 00:00:02
830+ 2 0 days 00:00:03
831+ dtype: timedelta64[ns]
832+ >>> ser.dt.seconds
833+ 0 1
834+ 1 2
835+ 2 3
836+ dtype: int32"""
837+ )
820838 seconds = _field_accessor (
821839 "seconds" ,
822840 "seconds" ,
823- "Number of seconds (>= 0 and less than 1 day) for each element." ,
841+ seconds_docstring ,
842+ )
843+
844+ microseconds_docstring = textwrap .dedent (
845+ """Number of microseconds (>= 0 and less than 1 second) for each element.
846+
847+ Examples
848+ --------
849+ >>> ser = pd.Series(pd.to_timedelta([1, 2, 3], unit='U'))
850+ >>> ser
851+ 0 0 days 00:00:00.000001
852+ 1 0 days 00:00:00.000002
853+ 2 0 days 00:00:00.000003
854+ dtype: timedelta64[ns]
855+ >>> ser.dt.microseconds
856+ 0 1
857+ 1 2
858+ 2 3
859+ dtype: int32"""
824860 )
825861 microseconds = _field_accessor (
826862 "microseconds" ,
827863 "microseconds" ,
828- "Number of microseconds (>= 0 and less than 1 second) for each element." ,
864+ microseconds_docstring ,
865+ )
866+
867+ nanoseconds_docstring = textwrap .dedent (
868+ """Number of nanoseconds (>= 0 and less than 1 microsecond) for each element.
869+
870+ Examples
871+ --------
872+ >>> ser = pd.Series(pd.to_timedelta([1, 2, 3], unit='N'))
873+ >>> ser
874+ 0 0 days 00:00:00.000000001
875+ 1 0 days 00:00:00.000000002
876+ 2 0 days 00:00:00.000000003
877+ dtype: timedelta64[ns]
878+ >>> ser.dt.nanoseconds
879+ 0 1
880+ 1 2
881+ 2 3
882+ dtype: int32"""
829883 )
830884 nanoseconds = _field_accessor (
831885 "nanoseconds" ,
832886 "nanoseconds" ,
833- "Number of nanoseconds (>= 0 and less than 1 microsecond) for each element." ,
887+ nanoseconds_docstring ,
834888 )
835889
836890 @property
0 commit comments