pyarrow.compute.scalar#

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

Expression representing a scalar value.

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

Parameters:
valuebool,int,float orstr

Python value of the scalar. This function accepts any value that can beconverted to apyarrow.Scalar usingpa.scalar().

Returns:
scalar_exprExpression

An Expression representing the scalar value

Notes

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

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

  • pyarrow.compute.scalar() creates anExpression object representinga scalar value that can be used in compute expressions, predicates, anddataset filtering operations.