pandas.tseries.offsets.Minute#
- class pandas.tseries.offsets.Minute#
Offset
nminutes.Represents a fixed duration of
nminutes (60 seconds each) for use in arithmetic with datetime-like objects. Useful for time-series alignment at sub-hour resolution.- Parameters:
- nint, default 1
The number of minutes represented.
See also
DateOffsetStandard kind of date increment.
Examples
You can use the parameter
nto represent a shift of n minutes.>>> from pandas.tseries.offsets import Minute >>> ts = pd.Timestamp(2022, 12, 9, 15) >>> ts Timestamp('2022-12-09 15:00:00')
>>> ts + Minute(n=10) Timestamp('2022-12-09 15:10:00') >>> ts - Minute(n=10) Timestamp('2022-12-09 14:50:00')
>>> ts + Minute(n=-10) Timestamp('2022-12-09 14:50:00')