deephaven.filters¶
This module implement various filters that can be used in deephaven table’s filter operations.
- class Filter(j_filter)[source]¶
Bases:
JObjectWrapper
A Filter object represents a filter that can be used in Table’s filtering(where) operations.
- j_object_type¶
alias of
Filter
- class PatternMode(value)[source]¶
Bases:
Enum
The regex mode to use
- FIND = io.deephaven.api.filter.FilterPattern$Mode(objectRef=0x5565f2ff9f22)¶
Matches any subsequence of the input against the pattern
- MATCHES = io.deephaven.api.filter.FilterPattern$Mode(objectRef=0x5565f2ff9f2a)¶
Matches the entire input against the pattern
- and_(filters)[source]¶
Creates a new filter that evaluates to true when all of the given filters evaluates to true.
- is_not_null(col)[source]¶
Creates a new filter that evaluates to true when the col is not null, and evaluates to false when col is null.
- Parameters:
col (str) – the column name
- Return type:
- Returns:
a new is-not-null Filter
- is_null(col)[source]¶
Creates a new filter that evaluates to true when the col is null, and evaluates to false when col is not null.
- Parameters:
col (str) – the column name
- Return type:
- Returns:
a new is-null Filter
- not_(filter_)[source]¶
Creates a new filter that evaluates to the opposite of what filter_ evaluates to.
- or_(filters)[source]¶
Creates a new filter that evaluates to true when any of the given filters evaluates to true.
- pattern(mode, col, regex, invert_pattern=False)[source]¶
Creates a regular-expression pattern filter.
See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html for documentation on the regex pattern.
This filter will never match
null
values.- Parameters:
mode (PatternMode) – the mode
col (str) – the column name
regex (str) – the regex pattern
invert_pattern (bool) – if the pattern matching logic should be inverted
- Return type:
- Returns:
a new pattern filter
- Raises:
DHError –