def process_axes(self, obj, columns=None):
<EOL>if columns is not None:<EOL><INDENT>columns = list(columns)<EOL><DEDENT>if columns is not None and self.is_multi_index:<EOL><INDENT>for n in self.levels:<EOL><INDENT>if n not in columns:<EOL><INDENT>columns.insert(<NUM_LIT:0>, n)<EOL><DEDENT><DEDENT><DEDENT>for axis, labels in self.non_index_axes:<EOL><INDENT>obj = _reindex_axis(obj, axis, labels, columns)<EOL><DEDENT>if self.selection.filter is not None:<EOL><INDENT>for field, op, filt in self.selection.filter.format():<EOL><INDENT>def process_filter(field, filt):<EOL><INDENT>for axis_name in obj._AXIS_NAMES.values():<EOL><INDENT>axis_number = obj._get_axis_number(axis_name)<EOL>axis_values = obj._get_axis(axis_name)<EOL>if field == axis_name:<EOL><INDENT>if self.is_multi_index:<EOL><INDENT>filt = filt.union(Index(self.levels))<EOL><DEDENT>takers = op(axis_values, filt)<EOL>return obj.loc._getitem_axis(takers,<EOL>axis=axis_number)<EOL><DEDENT>elif field in axis_values:<EOL><INDENT>values = ensure_index(getattr(obj, field).values)<EOL>filt = ensure_index(filt)<EOL>if isinstance(obj, DataFrame):<EOL><INDENT>axis_number = <NUM_LIT:1> - axis_number<EOL><DEDENT>takers = op(values, filt)<EOL>return obj.loc._getitem_axis(takers,<EOL>axis=axis_number)<EOL><DEDENT><DEDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>".format(field=field))<EOL><DEDENT>obj = process_filter(field, filt)<EOL><DEDENT><DEDENT>return obj<EOL>
process axes filters