pyarrow.dataset.scalar#

pyarrow.dataset.scalar(value)[source]#

Expression representing a scalar value.

Creates an Expression object representing a scalar value that can be used in compute expressions and predicates.

Parameters:
valuebool, int, float or str

Python value of the scalar. This function accepts any value that can be converted to a pyarrow.Scalar using pa.scalar().

Returns:
scalar_exprExpression

An Expression representing the scalar value

Notes

This function differs from pyarrow.scalar() in the following way:

  • pyarrow.scalar() creates a pyarrow.Scalar object that represents a single value in Arrow’s memory model.

  • pyarrow.compute.scalar() creates an Expression object representing a scalar value that can be used in compute expressions, predicates, and dataset filtering operations.