Filter
Keep rows that match conditions and remove the rest. Filter by range, text match, or empty values. Combine multiple conditions with AND logic.
Filter keeps rows that match your conditions and removes all others. Each filter targets one column, applies a condition (equal, contains, is empty, etc.), and specifies the value to compare against, if the condition needs one. Add multiple filters to narrow further. Every filter must be satisfied for a row to survive (AND logic).
All column types are supported: numeric, categorical (string), and datetime.
When to Use Filter
- Isolating a segment. Keep only orders from a specific region, product category, or customer tier for segment-level analysis.
- Removing test or invalid data. Exclude rows where
status = "test"orrevenue <= 0before running aggregations. - Date range scoping. Keep only rows within a specific date range before exporting or joining to another dataset.
- Finding missing data. Isolate rows where
emailis empty to route them to a cleanup step, or keep only rows where a required field is filled in. - Partial text matching. Keep rows where
customer_emailcontains@gmail.com, or whereskustarts with a specific product-line prefix. - Excluding known bad values. Remove rows where a category column contains a deprecated label you are not yet ready to replace with Find & Replace.
- Narrowing before Group By. Filter to the relevant subset before aggregating to avoid computing over the full dataset.
Sample Dataset
The examples in this doc use the Edilitics sample orders dataset. Download it to follow along in your own workspace.
edilitics_sample_orders.csv
Sample orders dataset for hands-on practice · 500 rows
Relevant columns for Filter examples:
Prop
Type
Conditions by Column Type
The available conditions change depending on the type of column selected.
String columns support eight conditions:
| Condition | Keeps rows where |
|---|---|
| Equal to | the column value matches any of the selected values |
| Not Equal to | the column value does not match any of the selected values |
| Contains | the column value contains the entered text anywhere |
| Does Not Contain | the column value does not contain the entered text |
| Starts With | the column value begins with the entered text |
| Ends With | the column value ends with the entered text |
| Is Empty | the column value is null |
| Is Not Empty | the column value is not null |
For Equal to and Not Equal to, the Target Value(s) field is a multi-select dropdown pre-populated with the actual values in the column. Select one or more, or type a value not in the list to create it. Contains, Does Not Contain, Starts With, and Ends With take a single text fragment to match. Is Empty and Is Not Empty need no value at all.
Example: region Equal to East, West keeps all rows where region is East or West. region Contains Coast keeps rows where region includes the text "Coast" anywhere in the value.
Numeric columns support eight conditions:
| Condition | Keeps rows where |
|---|---|
| Equal to | value matches any of the entered values |
| Not Equal to | value does not match any of the entered values |
| Greater Than | value is strictly greater than the entered number |
| Less Than | value is strictly less than the entered number |
| Greater Than Equal to | value is greater than or equal to the entered number |
| Less Than Equal to | value is less than or equal to the entered number |
| Is Empty | value is null |
| Is Not Empty | value is not null |
For Equal to and Not Equal to, you can enter multiple values. For comparison conditions (Greater Than, Less Than, etc.), enter a single number. Is Empty and Is Not Empty need no value.
Datetime columns show a date picker and/or time picker instead of a text input for conditions that need a value. The pickers available depend on the column's exact type:
- Date column: date picker only
- Time column: time picker only (HH:mm:ss format)
- Datetime column: both date picker and time picker
Eight conditions apply: Equal to, Not Equal to, Greater Than, Less Than, Greater Than Equal to, Less Than Equal to, Is Empty, Is Not Empty. Is Empty and Is Not Empty need no date or time value.
Use Greater Than Equal to + Less Than Equal to in two separate filter rows to create a date range (see Multiple Filters section below).
Multiple Filters and AND Logic
When you add more than one filter row, all filters are applied sequentially. A row must pass every filter to appear in the output. This is AND logic.
Example: two filters applied together:
revenueGreater Than Equal to1000regionEqual toEast
Only rows where revenue is 1000 or above AND region is East are kept. Rows matching only one condition are removed.
To implement OR logic (keep rows matching either condition), use the Code Editor operation with a Polars expression: df.filter((pl.col("region") == "East") | (pl.col("region") == "West")).
How to Apply Filter
Open the Filter operation
In your Transform pipeline, click Add Operation and select Filter from the operation list.
Select a column
Choose the column to filter on from the Filter Column dropdown. Numeric, categorical, and datetime columns are all available.
Choose a condition
Select a condition from the Condition dropdown. The options shown depend on the column type. The Condition dropdown is disabled until a column is selected.
- Categorical columns: Equal to, Not Equal to, Contains, Does Not Contain, Starts With, Ends With, Is Empty, Is Not Empty
- Numeric columns: Equal to, Not Equal to, Greater Than, Less Than, Greater Than Equal to, Less Than Equal to, Is Empty, Is Not Empty
- Datetime columns: same eight as numeric, with date/time pickers for conditions that need a value
Enter target value(s)
For categorical and numeric Equal to / Not Equal to: the Target Value(s) field shows a multi-select dropdown pre-populated with actual column values. Select one or more, or type to add a value not in the list.
For comparison conditions (Greater Than, Less Than, etc.) and text-match conditions (Contains, Starts With, etc.): enter a single value.
For Is Empty and Is Not Empty: no value field is shown. The row reads "No value needed."
For datetime columns: use the date picker and/or time picker that appear.
The Target Value(s) field is disabled until a condition is selected.
Add more filters (optional)
Click Add Column to add another filter row for a different column. All filters combine as AND logic. The Add Column button is disabled until the current row has all required fields filled.
Remove a filter row (optional)
Click the remove icon on any row. The icon only appears when more than one row exists.
Save the operation
Click Save & Preview. Edilitics applies all filters in sequence. A success toast confirms: "Filter applied. Preview updated to reflect matching rows."
Verify in the preview
Check the row count and spot-check values to confirm the expected rows were kept. If too many or too few rows remain, remove the operation and reconfigure.
Before and After
Two filters applied in one operation:
revenueGreater Than Equal to1000statusNot Equal tocancelled
Input:
| region | revenue | status |
|---|---|---|
| East | 500 | completed |
| East | 1200 | completed |
| West | 800 | cancelled |
| West | 3400 | completed |
| East | 150 | completed |
Output (rows passing both conditions):
| region | revenue | status |
|---|---|---|
| East | 1200 | completed |
| West | 3400 | completed |
3 rows removed: two for revenue below 1000, one for cancelled status.
Code Equivalent
-- AND logic: both conditions must be true
SELECT *
FROM orders
WHERE revenue >= 1000
AND status != 'cancelled';
-- Date range filter
SELECT *
FROM orders
WHERE order_date >= '2024-01-01'
AND order_date <= '2024-06-30';
-- Text match and missing values
SELECT *
FROM orders
WHERE customer_email LIKE '%@gmail.com%'
AND email IS NOT NULL;import polars as pl
# AND logic: chain .filter() calls
df = (
df
.filter(pl.col("revenue").ge(1000))
.filter(~pl.col("status").is_in(["cancelled"]))
)
# Equal to multiple values
df = df.filter(pl.col("region").is_in(["East", "West"]))
# Date range
df = df.filter(
pl.col("order_date").ge(pl.lit("2024-01-01").cast(pl.Date))
).filter(
pl.col("order_date").le(pl.lit("2024-06-30").cast(pl.Date))
)
# Contains / starts with / ends with
df = df.filter(pl.col("customer_email").str.contains("@gmail.com", literal=True))
df = df.filter(pl.col("sku").str.starts_with("WH-"))
df = df.filter(pl.col("sku").str.ends_with("-CLR"))
# Is Empty / Is Not Empty
df = df.filter(pl.col("email").is_null())
df = df.filter(pl.col("email").is_not_null())After Save & Preview, the pipeline shows a DQ delta badge on this step: green if the table score improved, red if it dropped. See Data Quality Scoring for how scores are calculated.
Operation Reference
Prop
Type
Frequently Asked Questions
Next Steps
Group By
Aggregate the filtered subset by category or time period.
Sort / Order By
Sort the filtered rows before exporting or joining.
Drop Duplicates
Remove duplicate rows from the filtered result.
Conditional Column
Add a new column based on conditions instead of filtering rows out.
Need help? Email support@edilitics.com with your workspace, job ID, and context. We reply within one business day.
Last updated on
Concat
Concatenate tables vertically, horizontally, or diagonally. Schema compatibility is checked automatically with built-in duplicate handling. No code needed.
Sampling
Sample rows from your dataset using simple random sampling, systematic sampling, or stratified sampling by category group. No code needed.