hipdf.core.dtypes.ListDtype.from_arrow

hipdf.core.dtypes.ListDtype.from_arrow#

21 min read time

Applies to Linux

classmethod ListDtype.from_arrow(typ)#

Creates a ListDtype from pyarrow.ListType.

Parameters#

typpyarrow.ListType

A pyarrow.ListType that has to be converted to ListDtype.

Returns#

obj : ListDtype

Examples#

>>> import cudf
>>> import pyarrow as pa
>>> arrow_type = pa.infer_type([[1]])
>>> arrow_type
ListType(list<item: int64>)
>>> list_dtype = cudf.ListDtype.from_arrow(arrow_type)
>>> list_dtype
ListDtype(int64)