Partition ADAFs Predicate

../../../../_images/partition_list.svg
class node_filter_list.PartitionADAFsPredicate[source]

Partition nodes with predicate takes a configurable predicate function (a function that returns True or False) from the configuration and uses it to decide how to partition the output.

The function is applied for each input element in the list when it returns True, then the element is written to the first output, otherwise it is written to the second output.

Examples (with table as the element type):

Remove tables with zero length columns:

lambda table: table.number_of_columns() > 0

Remove empty tables:

lambda table: not table.is_empty()

Partition a list of ADAFs using a predicate.

Inputs:
in
: [adaf]

Input data ADAFs

Outputs:
true
: [adaf]

Output data ADAFs where predicate returns True

false
: [adaf]

Output data ADAFs where predicate returns True

Configuration:
Predicate partition function

Partition function