Hi,
I would like to ask two questions related to how to use text-filter function.
As shown in a topic in Filters | Datagrok, I would like to use multiple keywords for and/or search. Is this function still available in the current version? Unfortunately I couldn’t find it.
I checked how to use free text filter shown in Can we filter rows by substring - #3 by skalkin. I checked that I can filter by and/or condition such as prop1 startswith A and prop2 contains B. Are there any other methods other than startswith and contains? Besides, can I use regex in free-text-filter funtion?
Any comments and information are well appreciated.
Currently we try to detect the “Text” type (as opposed to categories that are more commonly used in tabular data) automatically, but indeed sometimes you want to force it. What Olena described is more like a workaround, we’ll make it more intuitive.
Are there any other methods other than startswith and contains? Besides, can I use regex in free-text-filter funtion?
Yes, you can use regex, and there are more additional options! We were not advertising this particular filter because it’s still not polished and there are some known bugs present, but if you found it already, here’s how you can use right now (bugs are being fixed):
Free-text filter
Free-text filter lets you enter custom search terms. Typically, search terms
have a form of column nameoperationvalue. The following operations are supported:
numerical columns: none, =, !=, >, <, >=, <=, in, not in, -, is null, is not null
age > 40
height is null
string columns: none, contains, starts with, ends with, equals, !=, regex, in, not in, is null, is not null
race contains sian // Asian, Caucasian
race starts with B
race in (Black, Asian)
race regex ck$
datetime columns: none, equals, before, after, range, is null, is not null
started after 7/1/1991
bool columns: true, false
Conditions
Free-text filter also understands (very basic) logical conditions. Here are some examples:
age > 30 and height > 190
age > 30 and sex = F
Unfortunately, at the moment free-text filter does not work with columns that have space in the name.
We are working on developing another filter that would let you specify column/operation/value in a more structured form.
@lbankurova , let’s also document our filtering functionality better, there are many features and options but currently it’s hard to find them. Of course we’ll make it easier to find too