def drop(self, labels, errors='raise'):
        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)
Make new Index with passed list of labels deleted
dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index.drop