def _filter_by_statement(self, statement):
        """Filter the data collection based on a conditional statement."""
        self.__class__._check_conditional_statement(statement, 1)
        _filt_values, _filt_datetimes = [], []
        for i, a in enumerate(self._values):
            if eval(statement, {'a': a}):
                _filt_values.append(a)
                _filt_datetimes.append(self.datetimes[i])
        return _filt_values, _filt_datetimes
def _filter_by_statement ( self , statement ) : self . __class__ . _check_conditional_statement ( statement , 1 ) _filt_values , _filt_datetimes = [ ] , [ ] for i , a in enumerate ( self . _values ) : if eval ( statement , { 'a' : a } ) : _filt_values . append ( a ) _filt_datetimes . append ( self . datetimes [ i ] ) return _filt_values , _filt_datetimes
Filter the data collection based on a conditional statement.