Skip to content

Filtering

Damien Farrell edited this page Aug 17, 2017 · 2 revisions

Filtering tables is done using either a string query and/or one or more pre-defined filters defined with widgets. Pressing the filtering button will bring up the dialog below the table. Manual predefined filters can be added by pressing the + button. These are used alone or in conjunction with the string query as shown below. The filters are joined together using the first menu item using either 'AND', 'OR' or 'NOT' boolean logic. When filtered results are found the found rows are highlighted. You can also limit the table to show the filtered set which can be treated as usual (i.e. plots made etc). Closing the query box restores the full table. If you want to keep the filtered table you can copy and paste in another sheet.

String queries

String based query are made up fairly intuitive expressions. The one caveat is that column names cannot contain spaces to be used in an expression. It is best in these cases to convert column names (i.e. replace spaces with an underscore '_').

Simple examples:

find all rows in which the value of column a is less than b and b less than c

a < b & b < c

can also be written as:

a < b and b < c

Related

see the pandas query() method page for more details. Note that using query requires the numexpr library.