cudf.core.dtypes.ListDtype.from_arrow#

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:
objListDtype

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)