| [ Web Proxy ] |
| Viewing: https://arrow.apache.org/docs/python/generated/pyarrow.bool8.html | [Back] [Original] |
Section Navigation
Create instance of bool8 extension type.
Bool8TypeExamples
Create an instance of bool8 extension type:
>>> import pyarrow as pa
>>> type = pa.bool8()
>>> type
Bool8Type(extension<arrow.bool8>)
Inspect the data type:
>>> type.storage_type
DataType(int8)
Create a table with a bool8 array:
>>> arr = [-1, 0, 1, 2, None]
>>> storage = pa.array(arr, pa.int8())
>>> other = pa.ExtensionArray.from_storage(type, storage)
>>> pa.table([other], names=["unknown_col"])
pyarrow.Table
unknown_col: extension<arrow.bool8>
----
unknown_col: [[-1,0,1,2,null]]
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 |