

def drop(self, labels, errors='raise'):
    "\n        Make new Index with passed list of labels deleted\n\n        Parameters\n        ----------\n        labels : array-like\n        errors : {'ignore', 'raise'}, default 'raise'\n            If 'ignore', suppress error and existing labels are dropped.\n\n        Returns\n        -------\n        dropped : Index\n        "
    labels = com._index_labels_to_array(labels)
    indexer = self.get_indexer(labels)
    mask = (indexer == (- 1))
    if mask.any():
        if (errors != 'ignore'):
            raise ValueError(('labels %s not contained in axis' % labels[mask]))
        indexer = indexer[(~ mask)]
    return self.delete(indexer)

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