(self, filter, col)
return self._range_filter_to_indicator(filter, col, fmin, fmax)
Return selection of rows matched by the given string filter.

        Parameters
        ----------
        filter: FilterString
        col: np.ndarray

        Returns
        -------
        A 1d bool array. len(result) == len(self)
Return selection of rows matched by the given string filter.
Return selection of rows matched by the given string filter .
def _string_filter_to_indicator(self, filter, col):
        """Return selection of rows matched by the given string filter.

        Parameters
        ----------
        filter: FilterString
        col: np.ndarray

        Returns
        -------
        A 1d bool array. len(result) == len(self)
        """
        if filter.oper == filter.IsDefined:
            return col.astype(bool)

        col = col.astype(str)
        fmin = filter.min or ""
        fmax = filter.max or ""

        if not filter.case_sensitive:
            # convert all to lower case
            col = np.char.lower(col)
            fmin = fmin.lower()
            fmax = fmax.lower()

        if filter.oper == filter.Contains:
            return np.fromiter((fmin in e for e in col),
                               dtype=bool)
        if filter.oper == filter.StartsWith:
            return np.fromiter((e.startswith(fmin) for e in col),
                               dtype=bool)
        if filter.oper == filter.EndsWith:
            return np.fromiter((e.endswith(fmin) for e in col),
                               dtype=bool)

        return self._range_filter_to_indicator(filter, col, fmin, fmax)
def _string_filter_to_indicator ( self , filter , col ) : if filter . oper == filter . IsDefined : return col . astype ( bool ) col = col . astype ( str ) fmin = filter . min or "" fmax = filter . max or "" if not filter . case_sensitive : # convert all to lower case col = np . char . lower ( col ) fmin = fmin . lower ( ) fmax = fmax . lower ( ) if filter . oper == filter . Contains : return np . fromiter ( ( fmin in e for e in col ) , dtype = bool ) if filter . oper == filter . StartsWith : return np . fromiter ( ( e . startswith ( fmin ) for e in col ) , dtype = bool ) if filter . oper == filter . EndsWith : return np . fromiter ( ( e . endswith ( fmin ) for e in col ) , dtype = bool ) return self . _range_filter_to_indicator ( filter , col , fmin , fmax )