A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://arrow.apache.org/docs/python/api/../generated/pyarrow.opaque.html below:

pyarrow.opaque — Apache Arrow v21.0.0

pyarrow.opaque#
pyarrow.opaque(DataType storage_type, str type_name, str vendor_name)#

Create instance of opaque extension type.

Parameters:
storage_typeDataType

The underlying data type.

type_namestr

The name of the type in the external system.

vendor_namestr

The name of the external system.

Returns:
typeOpaqueType

Examples

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]]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4