pandas.Timedelta.total_seconds#
- Timedelta.total_seconds()#
Total seconds in the duration.
This method calculates the total duration in seconds by combining the days, seconds, and microseconds of the Timedelta object.
See also
to_timedeltaConvert argument to timedelta.
TimedeltaRepresents a duration, the difference between two dates or times.
Timedelta.secondsReturns the seconds component of the timedelta.
Timedelta.microsecondsReturns the microseconds component of the timedelta.
Examples
>>> td = pd.Timedelta('1min') >>> td Timedelta('0 days 00:01:00') >>> td.total_seconds() 60.0