def delete(self, item):
indexer = self.items.get_loc(item)<EOL>is_deleted = np.zeros(self.shape[<NUM_LIT:0>], dtype=np.bool_)<EOL>is_deleted[indexer] = True<EOL>ref_loc_offset = -is_deleted.cumsum()<EOL>is_blk_deleted = [False] * len(self.blocks)<EOL>if isinstance(indexer, int):<EOL><INDENT>affected_start = indexer<EOL><DEDENT>else:<EOL><INDENT>affected_start = is_deleted.nonzero()[<NUM_LIT:0>][<NUM_LIT:0>]<EOL><DEDENT>for blkno, _ in _fast_count_smallints(self._blknos[affected_start:]):<EOL><INDENT>blk = self.blocks[blkno]<EOL>bml = blk.mgr_locs<EOL>blk_del = is_deleted[bml.indexer].nonzero()[<NUM_LIT:0>]<EOL>if len(blk_del) == len(bml):<EOL><INDENT>is_blk_deleted[blkno] = True<EOL>continue<EOL><DEDENT>elif len(blk_del) != <NUM_LIT:0>:<EOL><INDENT>blk.delete(blk_del)<EOL>bml = blk.mgr_locs<EOL><DEDENT>blk.mgr_locs = bml.add(ref_loc_offset[bml.indexer])<EOL><DEDENT>self.axes[<NUM_LIT:0>] = self.items[~is_deleted]<EOL>self.blocks = tuple(b for blkno, b in enumerate(self.blocks)<EOL>if not is_blk_deleted[blkno])<EOL>self._shape = None<EOL>self._rebuild_blknos_and_blklocs()<EOL>
Delete selected item (items if non-unique) in-place.