Filtering¶
The filter() method narrows down the rows in a bundle using a SQL SELECT query. Unlike query() which returns a separate result set, filter() modifies the bundle in place.
Basic Usage¶
Parameterized Filters¶
Use $1, $2, etc. as placeholders to safely pass parameters:
Note
CSV, TSV, and JSONL columns are imported as text. Comparing one to a number with >, >=, <, <=, or BETWEEN is rejected (as text it would compare lexicographically, so "9" > "50"). CAST the column as above, or convert it once with CAST COLUMN.
Note
filter() modifies the bundle in place and returns self for chaining. To run a query that returns an independent result set, use query() instead.