where_not_in
The where_not_in method returns a new table containing rows from the source table, where the rows do not match values in the filter table. The filter is updated whenever either table changes.
Note
where_not_in is not appropriate for all situations. Its purpose is to enable more efficient filtering for an infrequently changing filter table.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| filter_table | Table | The table containing the set of values to filter on. |
| cols | Union[str, list[str]] | A list of the columns (as Strings) to match between the two tables.
Matches are defined the same as the set exclusion operator ( |
Returns
A new table containing rows from the source table, where the rows do not match values in the filter table.
Examples
The following example creates a table containing only the colors not present in the filter table.
The following example creates a table containing only the colors and codes present in the filter table. When using multiple matches, the resulting table will include only values that are in both matches. In this example, only one row matches both color AND codes. This results in a new table that has one matching value.