pandas.
TimedeltaIndex
Immutable ndarray of timedelta64 data, represented internally as int64, and which can be boxed to timedelta objects.
Optional timedelta-like data to construct index with.
Which is an integer/float number.
One of pandas date offset strings or corresponding objects. The string ‘infer’ can be passed in order to set the frequency of the index as the inferred frequency upon creation.
Make a copy of input ndarray.
Name to be stored in the index.
See also
Index
The base pandas Index type.
Timedelta
Represents a duration between two dates or times.
DatetimeIndex
Index of datetime64 data.
PeriodIndex
Index of Period data.
timedelta_range
Create a fixed-frequency TimedeltaIndex.
Notes
To learn more about the frequency strings, please see this link.
Attributes
days
Number of days for each element.
seconds
Number of seconds (>= 0 and less than 1 day) for each element.
microseconds
Number of microseconds (>= 0 and less than 1 second) for each element.
nanoseconds
Number of nanoseconds (>= 0 and less than 1 microsecond) for each element.
components
Return a dataframe of the components (days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds) of the Timedeltas.
inferred_freq
Tryies to return a string representing a frequency guess, generated by infer_freq.
Methods
to_pytimedelta(self, \*args, \*\*kwargs)
to_pytimedelta
Return Timedelta Array/Index as object ndarray of datetime.timedelta objects.
to_series(self[, index, name])
to_series
Create a Series with both index and values equal to the index keys.
round(self, \*args, \*\*kwargs)
round
Perform round operation on the data to the specified freq.
floor(self, \*args, \*\*kwargs)
floor
Perform floor operation on the data to the specified freq.
ceil(self, \*args, \*\*kwargs)
ceil
Perform ceil operation on the data to the specified freq.
to_frame(self[, index, name])
to_frame
Create a DataFrame with a column containing the Index.
mean(self, \*args, \*\*kwargs)
mean
Return the mean value of the Array.