def drop(self, labels, errors='<STR_LIT>'):
arr_dtype = '<STR_LIT:object>' if self.dtype == '<STR_LIT:object>' else None<EOL>labels = com.index_labels_to_array(labels, dtype=arr_dtype)<EOL>indexer = self.get_indexer(labels)<EOL>mask = indexer == -<NUM_LIT:1><EOL>if mask.any():<EOL><INDENT>if errors != '<STR_LIT:ignore>':<EOL><INDENT>raise KeyError(<EOL>'<STR_LIT>'.format(labels[mask]))<EOL><DEDENT>indexer = indexer[~mask]<EOL><DEDENT>return self.delete(indexer)<EOL>
Make new Index with passed list of labels deleted.

Parameters
----------
labels : array-like
errors : {'ignore', 'raise'}, default 'raise'
    If 'ignore', suppress error and existing labels are dropped.

Returns
-------
dropped : Index

Raises
------
KeyError
    If not all of the labels are found in the selected axis