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
T
return the transpose, which is by definition self asi8
asobject
base
return the base object if the memory of the underlying data is shared components
Return a dataframe of the components (days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds) of the Timedeltas. data
return the data pointer of the underlying data days
Number of days for each element. dtype
dtype_str
flags
freq
freqstr
return the frequency object as a string if its set, otherwise None has_duplicates
hasnans
inferred_freq
inferred_type
is_all_dates
is_monotonic
alias for is_monotonic_increasing (deprecated) is_monotonic_decreasing
return if the index is monotonic decreasing (only equal or is_monotonic_increasing
return if the index is monotonic increasing (only equal or is_unique
itemsize
return the size of the dtype of the item of the underlying data microseconds
Number of microseconds (>= 0 and less than 1 second) for each element. name
names
nanoseconds
Number of nanoseconds (>= 0 and less than 1 microsecond) for each element. nbytes
return the number of bytes in the underlying data ndim
return the number of dimensions of the underlying data, by definition 1 nlevels
resolution
seconds
Number of seconds (>= 0 and less than 1 day) for each element. shape
return a tuple of the shape of the underlying data size
return the number of elements in the underlying data strides
return the strides of the underlying data values
return the underlying data as an ndarray Methods