cudf.core.dtypes.ListDtype.from_arrow#
- classmethod ListDtype.from_arrow(typ)#
Creates a
ListDtype
frompyarrow.ListType
.- Parameters:
- typpyarrow.ListType
A
pyarrow.ListType
that has to be converted toListDtype
.
- Returns:
- obj
ListDtype
- obj
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)