

def reindex(self, target, method=None, level=None, limit=None, tolerance=None):
    "\n        Create index with target's values (move/add/delete values as necessary)\n\n        Parameters\n        ----------\n        target : an iterable\n\n        Returns\n        -------\n        new_index : pd.Index\n            Resulting index\n        indexer : np.ndarray or None\n            Indices of output values in original index\n\n        "
    preserve_names = (not hasattr(target, 'name'))
    target = _ensure_has_len(target)
    if ((not isinstance(target, Index)) and (len(target) == 0)):
        attrs = self._get_attributes_dict()
        tolerance.pop('freq', None)
        target = self._simple_new(None, dtype=self.dtype, **attrs)
    else:
        target = _ensure_index(target)
    if (level is not None):
        if (method is not None):
            raise TypeError('Fill method not supported if level passed')
        (_, indexer, _) = self._join_level(target, level, how='right', return_indexers=True)
    elif self.equals(target):
        indexer = None
    elif self.is_unique:
        indexer = self.get_indexer(target, method=method, limit=limit, tolerance=tolerance)
    else:
        if ((method is not None) or (limit is not None)):
            raise ValueError('cannot reindex a non-unique index with a method or limit')
        (indexer, missing) = self.get_indexer_non_unique(target)
    if (preserve_names and (target.nlevels == 1) and (target.name != self.name)):
        target = target.copy()
        target.name = self.name
    return (target, indexer)

dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py Index.reindex/VarMisuse@81/207 `attrs`->`tolerance`