types#
2026-03-11
20 min read time
- class pylibhipdf.types.DataType#
Bases:
objectIndicator for the logical data type of an element in a column.
This is the Cython representation of
cudf::data_type.Parameters#
- idtype_id
The type’s identifier
- scaleint
The scale associated with the data. Only used for decimal data types.
- static from_arrow(pa_typ) DataType#
Construct a DataType from a Python type.
Parameters#
- pa_typpyarrow type
A Pyarrow type (eg. pa)
Returns#
- DataType
The corresponding pylibcudf DataType.
Raises#
- ImportError
If pyarrow is not installed.
- TypeError
If the Python type is not supported.
- static from_py(type typ: type) DataType#
Construct a DataType from a Python type.
Parameters#
- typtype
A Python type (eg. int, str, list)
Returns#
- DataType
The corresponding pylibcudf DataType.
Raises#
- TypeError
If the Python type is not supported.
- id(self) type_id#
Get the id associated with this data type.
- scale(self) int32_t#
Get the scale associated with this data type.
- to_arrow(self, **kwargs)#
Convert a datatype to arrow.
Returns#
pyarrow.DataType
Notes#
Translation of some types requires extra information as a keyword argument. Specifically:
When translating a decimal type, provide
precisionWhen translating a struct type, provide
fieldsWhen translating a list type, provide the wrapped
value_type
- typestr#
DataType.typestr: str The array interface type string.
- pylibhipdf.types.Interpolation#
alias of
interpolation
- pylibhipdf.types.MaskState#
alias of
mask_state
- pylibhipdf.types.NanEquality#
alias of
nan_equality
- pylibhipdf.types.NanPolicy#
alias of
nan_policy
- pylibhipdf.types.NullEquality#
alias of
null_equality
- pylibhipdf.types.NullOrder#
alias of
null_order
- pylibhipdf.types.NullAware#
alias of
null_aware
- pylibhipdf.types.NullPolicy#
alias of
null_policy
- pylibhipdf.types.Order#
alias of
order
- pylibhipdf.types.Sorted#
alias of
sorted
- pylibhipdf.types.TypeId#
alias of
type_id