def search(self):
        """Applies the filter to the stored dataframe.

        A safe environment dictionary will be created, which stores all allowed
        functions and attributes, which may be used for the filter.
        If any object in the given `filterString` could not be found in the
        dictionary, the filter does not apply and returns `False`.

        Returns:
            tuple: A (indexes, success)-tuple, which indicates identified objects
                by applying the filter and if the operation was successful in
                general.

        """
        # there should be a grammar defined and some lexer/parser.
        # instead of this quick-and-dirty implementation.

        safeEnvDict = {
            'freeSearch': self.freeSearch,
            'extentSearch': self.extentSearch,
            'indexSearch': self.indexSearch

        }
        for col in self._dataFrame.columns:
            safeEnvDict[col] = self._dataFrame[col]

        try:
            searchIndex = eval(self._filterString, {'__builtins__': None}, safeEnvDict)
        except NameError as err:
            return [], False
        except SyntaxError as err:
            return [], False
        except ValueError as err:
            # the use of 'and'/'or' is not valid, need to use binary operators.
            return [], False
        except __HOLE__ as err:
            # argument must be string or compiled pattern
            return [], False
        return searchIndex, True
dataset/ETHPy150Open datalyze-solutions/pandas-qt/pandasqt/models/DataSearch.py/DataSearch.search