Skip to main content
`Ctrl`+`K`

# pandas.TimedeltaIndex.inferred_freq

TimedeltaIndex.inferred_freq

  Return the inferred frequency of the index.

  Attempts to determine the frequency of the index by analyzing the differences between consecutive values using `infer_freq`.

  Returns:
    str or None

      A string representing a frequency generated by `infer_freq`. Returns `None` if the frequency cannot be inferred.

  See also

  `DatetimeIndex.freqstr`

    Return the frequency object as a string if it’s set, otherwise `None`.

  Examples

  For `DatetimeIndex`:

      >>> idx = pd.DatetimeIndex(["2018-01-01", "2018-01-03", "2018-01-05"])
      >>> idx.inferred_freq
      '2D'

  For `TimedeltaIndex`:

      >>> tdelta_idx = pd.to_timedelta(["0 days", "10 days", "20 days"])
      >>> tdelta_idx
      TimedeltaIndex(['0 days', '10 days', '20 days'],
                     dtype='timedelta64[us]', freq=None)
      >>> tdelta_idx.inferred_freq
      '10D'