code: def _set_index(self, key, index):
          
          axis = key[0]
          origin = "{}0".format(axis)
          delta = "d{}".format(axis)
          if index is None:
              return delattr(self, key)
          if not isinstance(index, Index):
              try:
                  unit = index.unit
              except AttributeError:
                  unit = getattr(self, "_default_{}unit".format(axis))
              index = Index(index, unit=unit, copy=False)
          setattr(self, origin, index[0])
          if index.regular:
              setattr(self, delta, index[1] - index[0])
          else:
              delattr(self, delta)
          setattr(self, "_{}".format(key), index)
docs: Set a new index array for this series