| [ Web Proxy ] |
| Viewing: https://arrow.apache.org/docs/python/generated/../integration/../generated/pyarrow.scalar.html | [Back] [Original] |
Section Navigation
Create a pyarrow.Scalar instance from a Python object.
AnyPython object coercible to arrows type system.
pyarrow.DataTypeExplicit type to attempt to coerce to, otherwise will be inferred from the value.
NoneUse pandass semantics for inferring nulls from values in ndarray-like data. Defaults to False if not passed explicitly by user, or True if a pandas object is passed in.
pyarrow.MemoryPool, optionalIf not passed, will allocate memory from the currently-set default memory pool.
pyarrow.ScalarExamples
>>> import pyarrow as pa
>>> pa.scalar(42)
<pyarrow.Int64Scalar: 42>
>>> pa.scalar("string")
<pyarrow.StringScalar: 'string'>
>>> pa.scalar([1, 2])
<pyarrow.ListScalar: [1, 2]>
>>> pa.scalar([1, 2], type=pa.list_(pa.int16()))
<pyarrow.ListScalar: [1, 2]>
Copyright 2016-2026 Apache Software Foundation.
Apache Arrow, Arrow, Apache, the Apache logo, and the Apache Arrow project logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.
Created using Sphinx 9.1.0.
Built with the PyData Sphinx Theme 0.20.0.
| Web Proxy Viewer | New URL | Original Page |