Filter rows in Table¶
Filter the row in a table according to a comparison relation between the elements of two column. One of the column, C1, is located in the Table that will be filtered while the other, C0, is a column in a reference Table.
The comparison relation can defined as a lambda function in the configuration GUI by the user or one of the predefined relations can be used.
- The predefined relations are the following:
- Match C1 in C0
- keeps the row if the corresponding element in C1 exists in any row in C0.
- Don’t match C1 in C0
- keeps the row if corresponding element in C1 do not exist in any row in C0.
See https://docs.python.org/3/tutorial/controlflow.html#lambda-expressions for a description of lambda functions.
-
class
node_table_filter.
ColumnFilterNode
[source]¶ Filter rows in Table. The filtration will be performed according to a specified/selected comparison relation between the elements of a column in the considered Table and the elements of a column in a reference Table.
Ref. nodes: Inputs: - port0 : table
Table with column, C0, with reference values
- port1 : table
Table with column, C1
Outputs: - port0 : table
Filtered Table
Configuration: - Select C0 column
Select the column in Table1, upper port, to use as reference column C0 in the comparison.
- Select C1 column
Select the column in Table2, lower port, to use as object column C1 in the comparison.
- Select filter function
All available pre-defined filter functions.
- Use custom filter function
Use a custom filter (predicate) function to filter.
- Filter function
The predicate function to use when filtering.