

def putmask(self, mask, value):
    '\n        return a new Index of the values set with the mask\n\n        See also\n        --------\n        numpy.ndarray.putmask\n        '
    values = self.values.copy()
    try:
        np.putmask(values, mask, self._convert_for_op(value))
        return self._shallow_copy(values)
    except (ValueError, TypeError):
        return self.astype(object).putmask(mask, value)

dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py Index.putmask/original