cudf.core.dtypes.ListDtype.from_arrow#
- classmethod ListDtype.from_arrow(typ: pa.ListType) Self[source]#
Creates a
ListDtypefrompyarrow.ListType.- Parameters:
- typpyarrow.ListType
A
pyarrow.ListTypethat 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)