MCPcopy Create free account
hub / github.com/apache/arrow / scalar

Function scalar

python/pyarrow/compute.py:739–766  ·  view source on GitHub ↗

Expression representing a scalar value. Creates an Expression object representing a scalar value that can be used in compute expressions and predicates. Parameters ---------- value : bool, int, float or string Python value of the scalar. This function accepts any value

(value)

Source from the content-addressed store, hash-verified

737
738
739def scalar(value):
740 """Expression representing a scalar value.
741
742 Creates an Expression object representing a scalar value that can be used
743 in compute expressions and predicates.
744
745 Parameters
746 ----------
747 value : bool, int, float or string
748 Python value of the scalar. This function accepts any value that can be
749 converted to a ``pyarrow.Scalar`` using ``pa.scalar()``.
750
751 Notes
752 -----
753 This function differs from ``pyarrow.scalar()`` in the following way:
754
755 * ``pyarrow.scalar()`` creates a ``pyarrow.Scalar`` object that represents
756 a single value in Arrow's memory model.
757 * ``pyarrow.compute.scalar()`` creates an ``Expression`` object representing
758 a scalar value that can be used in compute expressions, predicates, and
759 dataset filtering operations.
760
761 Returns
762 -------
763 scalar_expr : Expression
764 An Expression representing the scalar value
765 """
766 return Expression._scalar(value)

Callers 1

ToStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected