Time deltas¶
Timedeltas are differences in times, expressed in difference units, e.g. days, hours, minutes, seconds. They can be both positive and negative.
Timedelta
is a subclass of datetime.timedelta
, and behaves in a similar manner,
but allows compatibility with np.timedelta64
types as well as a host of custom representation,
parsing, and attributes.
Parsing¶
You can construct a Timedelta
scalar through various arguments:
In [1]: import datetime
# strings
In [2]: pd.Timedelta('1 days')
Out[2]: Timedelta('1 days 00:00:00')
In [3]: pd.Timedelta('1 days 00:00:00')