cudf.StructDtype.from_arrow#

classmethod StructDtype.from_arrow(typ)#

Convert a pyarrow.StructType to StructDtype.

Examples

>>> import cudf
>>> import pyarrow as pa
>>> pa_struct_type = pa.struct({'x': pa.int32(), 'y': pa.string()})
>>> pa_struct_type
StructType(struct<x: int32, y: string>)
>>> cudf.StructDtype.from_arrow(pa_struct_type)
StructDtype({'x': dtype('int32'), 'y': dtype('O')})