Scalar¶
arro3.core.Scalar ¶
An arrow Scalar.
field
property
¶
field: Field
Access the field stored on this Scalar.
Note that this field usually will not have a name associated, but it may have metadata that signifies that this scalar is an extension (user-defined typed) scalar.
__arrow_c_array__ ¶
An implementation of the Arrow PyCapsule Interface. This dunder method should not be called directly, but enables zero-copy data transfer to other Python libraries that understand Arrow memory.
For example, you can call pyarrow.array()
to
convert this Scalar into a pyarrow Array, without copying memory. The generated
array is guaranteed to have length 1.
cast ¶
cast(target_type: ArrowSchemaExportable) -> Scalar
from_arrow
classmethod
¶
from_arrow(input: ArrowArrayExportable) -> Scalar
Construct this from an existing Arrow Scalar.
It can be called on anything that exports the Arrow data interface (has a
__arrow_c_array__
method) and returns an array with a single element.
Parameters:
-
input
(ArrowArrayExportable
) –Arrow scalar to use for constructing this object
Returns:
-
Scalar
–new Scalar