Spec-Zone.ru › Polars

polars.datatypes.Extension

class polars.datatypes.Extension(
    name: str,
    storage: PolarsDataType,
    metadata: str | None = None,
)

Generic extension data type.

When UNKNOWN_EXTENSION_TYPE_BEHAVIOR is set to "load_as_extension", any non-registered extension type will be loaded as this type.

Warning

This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.

See also

BaseExtension
polars.register_extension_type
__init__(
    name: str,
    storage: PolarsDataType,
    metadata: str | None = None,
) → None

Methods

__init__(name, storage[, metadata])

base_type()

Return this DataType's fundamental/root type class.

ext_from_params(name, storage, metadata)

Creates an Extension type instance from its parameters.

ext_metadata()

Returns the metadata for this extension type.

ext_name()

Returns the name of this extension type.

ext_storage()

Returns the storage type for this extension type.

from_python(py_type)

Return the Polars data type corresponding to a given Python type.

is_(other)

Check if this DataType is the same as another DataType.

is_decimal()

Check whether the data type is a decimal type.

is_extension()

Check whether the data type is an extension type.

is_float()

Check whether the data type is a floating point type.

is_integer()

Check whether the data type is an integer type.

is_nested()

Check whether the data type is a nested type.

is_numeric()

Check whether the data type is a numeric type.

is_object()

Check whether the data type is an object type.

is_signed_integer()

Check whether the data type is a signed integer type.

is_temporal()

Check whether the data type is a temporal type.

is_unsigned_integer()

Check whether the data type is an unsigned integer type.

to_dtype_expr()

Return a DataTypeExpr with a static DataType.

to_python()

Return the Python type corresponding to this Polars data type.

© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/api/polars.datatypes.Extension.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API