pandas.tseries.offsets.Micro#

class pandas.tseries.offsets.Micro#

Offset n microseconds.

Represents a fixed duration of n microseconds (1/1,000,000 of a second) for use in arithmetic with datetime-like objects. Enables microsecond-level precision in time-series operations.

Parameters:
nint, default 1

The number of microseconds represented.

See also

DateOffset

Standard kind of date increment.

Examples

You can use the parameter n to represent a shift of n microseconds.

>>> from pandas.tseries.offsets import Micro
>>> ts = pd.Timestamp(2022, 12, 9, 15)
>>> ts
Timestamp('2022-12-09 15:00:00')
>>> ts + Micro(n=1000)
Timestamp('2022-12-09 15:00:00.001000')
>>> ts - Micro(n=1000)
Timestamp('2022-12-09 14:59:59.999000')
>>> ts + Micro(n=-1000)
Timestamp('2022-12-09 14:59:59.999000')