types#
- class pylibcudf.types.DataType#
Indicator 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.
Attributes
DataType.typestr: str
Methods
from_arrow
(pa_typ)Construct a DataType from a Python type.
from_py
(type typ)Construct a DataType from a Python type.
id
(self)Get the id associated with this data type.
scale
(self)Get the scale associated with this data type.
- 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.
- typestr#
DataType.typestr: str
The array interface type string.
- pylibcudf.types.Interpolation#
See also
cudf::interpolation
.Enum members
LINEAR
LOWER
HIGHER
MIDPOINT
NEAREST
- pylibcudf.types.MaskState#
See also
cudf::mask_state
.Enum members
UNALLOCATED
UNINITIALIZED
ALL_VALID
ALL_NULL
- pylibcudf.types.NanEquality#
See also
cudf::nan_equality
.Enum members
ALL_EQUAL
UNEQUAL
- pylibcudf.types.NanPolicy#
See also
cudf::nan_policy
.Enum members
NAN_IS_NULL
NAN_IS_VALID
- pylibcudf.types.NullEquality#
See also
cudf::null_equality
.Enum members
EQUAL
UNEQUAL
- pylibcudf.types.NullOrder#
See also
cudf::null_order
.Enum members
AFTER
BEFORE
- pylibcudf.types.NullPolicy#
See also
cudf::null_policy
.Enum members
EXCLUDE
INCLUDE
- pylibcudf.types.Order#
See also
cudf::order
.Enum members
ASCENDING
DESCENDING
- pylibcudf.types.Sorted#
See also
cudf::sorted
.Enum members
NO
YES
- pylibcudf.types.TypeId#
See also
cudf::type_id
.Enum members
EMPTY
INT8
INT16
INT32
INT64
UINT8
UINT16
UINT32
UINT64
FLOAT32
FLOAT64
BOOL8
TIMESTAMP_DAYS
TIMESTAMP_SECONDS
TIMESTAMP_MILLISECONDS
TIMESTAMP_MICROSECONDS
TIMESTAMP_NANOSECONDS
DURATION_DAYS
DURATION_SECONDS
DURATION_MILLISECONDS
DURATION_MICROSECONDS
DURATION_NANOSECONDS
DICTIONARY32
STRING
LIST
DECIMAL32
DECIMAL64
DECIMAL128
STRUCT
NUM_TYPE_IDS