| [ Web Proxy ] |
| Viewing: https://arrow.apache.org/docs/python/generated/../api/../generated/pyarrow.opaque.html | [Back] [Original] |
Section Navigation
Create instance of opaque extension type.
OpaqueTypeExamples
Create an instance of an opaque extension type:
>>> import pyarrow as pa
>>> type = pa.opaque(pa.binary(), "other", "jdbc")
>>> type
OpaqueType(extension<arrow.opaque[storage_type=binary, type_name=other, vendor_name=jdbc]>)
Inspect the data type:
>>> type.storage_type
DataType(binary)
>>> type.type_name
'other'
>>> type.vendor_name
'jdbc'
Create a table with an opaque array:
>>> arr = [None, b"foobar"]
>>> storage = pa.array(arr, pa.binary())
>>> other = pa.ExtensionArray.from_storage(type, storage)
>>> pa.table([other], names=["unknown_col"])
pyarrow.Table
unknown_col: extension<arrow.opaque[storage_type=binary, type_name=other, vendor_name=jdbc]>
----
unknown_col: [[null,666F6F626172]]
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 |