class_docstr: common ops mixin to support a unified interface datetimelike Index
class_docstr_tok: ["common","ops","mixin","to","support","a","unified","interface","datetimelike","Index"]
docstr: Shift index by desired number of time frequency increments.
  
  This method is for shifting the values of datetime-like indexes
  by a specified time increment a given number of times.
  
  Parameters
  ----------
  periods : int
      Number of periods (or increments) to shift by,
      can be positive or negative.
  
      .. versionchanged:: 0.24.0
  
  freq : pandas.DateOffset, pandas.Timedelta or string, optional
      Frequency increment to shift by.
      If None, the index is shifted by its own `freq` attribute.
      Offset aliases are valid strings, e.g., 'D', 'W', 'M' etc.
  
  Returns
  -------
  pandas.DatetimeIndex
      Shifted index.
  
  See Also
  --------
  Index.shift : Shift values of Index.
  PeriodIndex.shift : Shift values of PeriodIndex.
code: def shift(self, periods, freq=None):
      """
      Shift index by desired number of time frequency increments.
  
      This method is for shifting the values of datetime-like indexes
      by a specified time increment a given number of times.
  
      Parameters
      ----------
      periods : int
          Number of periods (or increments) to shift by,
          can be positive or negative.
  
          .. versionchanged:: 0.24.0
  
      freq : pandas.DateOffset, pandas.Timedelta or string, optional
          Frequency increment to shift by.
          If None, the index is shifted by its own `freq` attribute.
          Offset aliases are valid strings, e.g., 'D', 'W', 'M' etc.
  
      Returns
      -------
      pandas.DatetimeIndex
          Shifted index.
  
      See Also
      --------
      Index.shift : Shift values of Index.
      PeriodIndex.shift : Shift values of PeriodIndex.
      """
      result = self._data._time_shift(periods, freq=freq)
      return type(self)(result, name=self.name)
  
imports: import operator
  import warnings
  import numpy
  from pandas._libs import NaT, iNaT, lib
  from pandas.compat.numpy import function
  from pandas.errors import AbstractMethodError
  from pandas.util._decorators import Appender, cache_readonly, deprecate_kwarg
  from pandas.core.dtypes.common import ensure_int64, is_dtype_equal, is_float, is_integer, is_list_like, is_period_dtype, is_scalar
  from pandas.core.dtypes.generic import ABCIndex, ABCIndexClass, ABCSeries
  from pandas.core import algorithms, ops
  from pandas.core.accessor import PandasDelegate
  from pandas.core.arrays import ExtensionOpsMixin
  from pandas.core.arrays.datetimelike import DatetimeLikeArrayMixin, _ensure_datetimelike_to_i8
  import pandas.core.indexes.base
  from pandas.core.indexes.base import Index, _index_shared_docs
  from pandas.core.tools.timedeltas import to_timedelta
  import pandas.io.formats.printing
label_desc: Use image node_id 35 for calling the DatetimeIndexOpsMixin obj's underlying member method code with example usage: obj.shift(periods, freq) and returns: type