Select: Filter rows using a callable predicate

class txf.Select(source, inputs, predicate)

The Select transform filters rows based on a predicate.

source: Transform

The input pipeline.

inputs: tuple(str) or str

The columns to use in the predicate. They will not be dropped from the output.

predicate: callable

A callable implementing the predicate. It will be given the values of inputs as positional arguments in the given order. the result will be treated as a Boolean.

Usage

Select(p, 'Sales', lambda sales: sales > 0)