pyarrow.opaque#
- pyarrow.opaque(DataTypestorage_type,strtype_name,strvendor_name)#
Create instance of opaque extension type.
- Parameters:
- Returns:
- type
OpaqueType
- type
Examples
Create an instance of an opaque extension type:
>>>importpyarrowaspa>>>type=pa.opaque(pa.binary(),"other","jdbc")>>>typeOpaqueType(extension<arrow.opaque[storage_type=binary, type_name=other, vendor_name=jdbc]>)
Inspect the data type:
>>>type.storage_typeDataType(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.Tableunknown_col: extension<arrow.opaque[storage_type=binary, type_name=other, vendor_name=jdbc]>----unknown_col: [[null,666F6F626172]]
On this page

