Skip to main content
`Ctrl`+`K`

# pandas.Series.dt.microseconds

Series.dt.microseconds

  Number of microseconds (>= 0 and less than 1 second) for each element.

  > This attribute returns the microseconds component of each timedelta value, which is the number of microseconds remaining after subtracting whole seconds. Values range from 0 to 999999.

  See also

  `pd.Timedelta.microseconds`

    Number of microseconds (>= 0 and less than 1 second).

  `pd.Timedelta.to_pytimedelta.microseconds`

    Number of microseconds (>= 0 and less than 1 second) of a datetime.timedelta.

  Examples

  For Series:

      >>> ser = pd.Series(pd.to_timedelta([1, 2, 3], unit='us'))
      >>> ser
      0   0 days 00:00:00.000001
      1   0 days 00:00:00.000002
      2   0 days 00:00:00.000003
      dtype: timedelta64[us]
      >>> ser.dt.microseconds
      0    1
      1    2
      2    3
      dtype: int32

  For TimedeltaIndex:

      >>> tdelta_idx = pd.to_timedelta([1, 2, 3], unit='us')
      >>> tdelta_idx
      TimedeltaIndex(['0 days 00:00:00.000001', '0 days 00:00:00.000002',
                      '0 days 00:00:00.000003'],
                     dtype='timedelta64[us]', freq=None)
      >>> tdelta_idx.microseconds
      Index([1, 2, 3], dtype='int32')