pyarrow.unregister_extension_type#
- pyarrow.unregister_extension_type(type_name)#
Unregister a Python extension type.
- Parameters:
- type_name
str
The name of the ExtensionType subclass to unregister.
- type_name
Examples
Define a UuidType extension type subclassing ExtensionType:
>>> import pyarrow as pa >>> class UuidType(pa.ExtensionType): ... def __init__(self): ... pa.ExtensionType.__init__(self, pa.binary(16), "my_package.uuid") ... def __arrow_ext_serialize__(self): ... # since we don't have a parameterized type, we don't need extra ... # metadata to be deserialized ... return b'' ... @classmethod ... def __arrow_ext_deserialize__(self, storage_type, serialized): ... # return an instance of this subclass given the serialized ... # metadata. ... return UuidType() ...
Register the extension type:
>>> pa.register_extension_type(UuidType())
Unregister the extension type:
>>> pa.unregister_extension_type("my_package.uuid")