Skip to main content
`Ctrl`+`K`

# pandas.Timedelta.resolution_string

Timedelta.resolution_string

  Return a string representing the lowest timedelta resolution.

  Each timedelta has a defined resolution that represents the lowest OR most granular level of precision. Each level of resolution is represented by a short string as defined below:

  Resolution: Return value

  - Days: ‘D’

  - Hours: ‘h’

  - Minutes: ‘min’

  - Seconds: ‘s’

  - Milliseconds: ‘ms’

  - Microseconds: ‘us’

  - Nanoseconds: ‘ns’

  Returns:
    str

      Timedelta resolution.

  See also

  `Timedelta.components`

    Return all components of the Timedelta as a namedtuple-like.

  `Timedelta.resolution`

    Return the smallest possible difference between non-equal Timedelta objects.

  Examples

      >>> td = pd.Timedelta('1 days 2 min 3 us 42 ns')
      >>> td.resolution_string
      'ns'

      >>> td = pd.Timedelta('1 days 2 min 3 us')
      >>> td.resolution_string
      'us'

      >>> td = pd.Timedelta('2 min 3 s')
      >>> td.resolution_string
      's'

      >>> td = pd.Timedelta(36, unit='us')
      >>> td.resolution_string
      'us'