pyarrow.acero.ProjectNodeOptions

class pyarrow.acero.ProjectNodeOptions(expressions, names=None)

Bases: _ProjectNodeOptions

Make a node which executes expressions on input batches, producing batches of the same length with new columns.

This is the option class for the “project” node factory.

The “project” operation rearranges, deletes, transforms, and creates columns. Each output column is computed by evaluating an expression against the source record batch. These must be scalar expressions (expressions consisting of scalar literals, field references and scalar functions, i.e. elementwise functions that return one value for each input row independent of the value of all other rows).

Parameters:
expressionslist of pyarrow.compute.Expression

List of expressions to evaluate against the source batch. This must be scalar expressions.

nameslist of str, optional

List of names for each of the ouptut columns (same length as expressions). If names is not provided, the string representations of exprs will be used.

__init__(self, expressions, names=None)

Methods

__init__(self, expressions[, names])