def select(self, crit, axis=<NUM_LIT:0>):
warnings.warn("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>FutureWarning, stacklevel=<NUM_LIT:2>)<EOL>axis = self._get_axis_number(axis)<EOL>axis_name = self._get_axis_name(axis)<EOL>axis_values = self._get_axis(axis)<EOL>if len(axis_values) > <NUM_LIT:0>:<EOL><INDENT>new_axis = axis_values[<EOL>np.asarray([bool(crit(label)) for label in axis_values])]<EOL><DEDENT>else:<EOL><INDENT>new_axis = axis_values<EOL><DEDENT>return self.reindex(**{axis_name: new_axis})<EOL>
Return data corresponding to axis labels matching criteria.

.. deprecated:: 0.21.0
    Use df.loc[df.index.map(crit)] to select via labels

Parameters
----------
crit : function
    To be called on each index (label). Should return True or False
axis : int

Returns
-------
selection : same type as caller