pandas.TimedeltaIndex¶
-
class
pandas.TimedeltaIndex¶ Immutable ndarray of timedelta64 data, represented internally as int64, and which can be boxed to timedelta objects
Parameters: data : array-like (1-dimensional), optional
Optional timedelta-like data to construct index with
unit: unit of the arg (D,h,m,s,ms,us,ns) denote the unit, optional
which is an integer/float number
freq: a frequency for the index, optional
copy : bool
Make a copy of input ndarray
start : starting value, timedelta-like, optional
If data is None, start is used as the start point in generating regular timedelta data.
periods : int, optional, > 0
Number of periods to generate, if generating index. Takes precedence over end argument
end : end time, timedelta-like, optional
If periods is none, generated index will extend to first conforming time on or just past end argument
closed : string or None, default None
Make the interval closed with respect to the given frequency to the ‘left’, ‘right’, or both sides (None)
name : object
Name to be stored in the index
Attributes
Treturn the transpose, which is by definition self asi8asobjectbasereturn the base object if the memory of the underlying data is shared componentsReturn a dataframe of the components (days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds) of the Timedeltas. datareturn the data pointer of the underlying data daysNumber of days for each element. dtypedtype_strflagsfreqfreqstrreturn the frequency object as a string if its set, otherwise None has_duplicateshasnansinferred_freqinferred_typeis_all_datesis_monotonicalias for is_monotonic_increasing (deprecated) is_monotonic_decreasingreturn if the index is monotonic decreasing (only equal or is_monotonic_increasingreturn if the index is monotonic increasing (only equal or is_uniqueitemsizereturn the size of the dtype of the item of the underlying data microsecondsNumber of microseconds (>= 0 and less than 1 second) for each element. namenamesnanosecondsNumber of nanoseconds (>= 0 and less than 1 microsecond) for each element. nbytesreturn the number of bytes in the underlying data ndimreturn the number of dimensions of the underlying data, by definition 1 nlevelsresolutionsecondsNumber of seconds (>= 0 and less than 1 day) for each element. shapereturn a tuple of the shape of the underlying data sizereturn the number of elements in the underlying data stridesreturn the strides of the underlying data valuesreturn the underlying data as an ndarray Methods