interop#

class pylibcudf.interop.ColumnMetadata(name: str = '', children_meta: list[pylibcudf.interop.ColumnMetadata] = <factory>)#

Metadata associated with a column.

This is the Python representation of cudf::column_metadata.

pylibcudf.interop.from_arrow(pyarrow_object, *, DataType data_type=None)#
pylibcudf.interop.from_arrow(pyarrow_object: DataType)
pylibcudf.interop.from_arrow(pyarrow_object: Table, *, data_type=None)
pylibcudf.interop.from_arrow(pyarrow_object: Scalar, *, data_type=None)
pylibcudf.interop.from_arrow(pyarrow_object: Array, *, data_type=None)

Create a cudf object from a pyarrow object.

Parameters:
pyarrow_objectUnion[pyarrow.Array, pyarrow.Table, pyarrow.Scalar]

The PyArrow object to convert.

Returns:
Union[Table, Scalar]

The converted object of type corresponding to the input type in cudf.

pylibcudf.interop.to_arrow(cudf_object, metadata=None)#
pylibcudf.interop.to_arrow(cudf_object: DataType, **kwargs)
pylibcudf.interop.to_arrow(cudf_object: Table, metadata=None)
pylibcudf.interop.to_arrow(cudf_object: Column, metadata=None)
pylibcudf.interop.to_arrow(cudf_object: Scalar, metadata=None)

Convert to a PyArrow object.

Parameters:
cudf_objectUnion[Column, Table, Scalar]

The cudf object to convert.

metadatalist

The metadata to attach to the columns of the table.

Returns:
Union[pyarrow.Array, pyarrow.Table, pyarrow.Scalar]

The converted object of type corresponding to the input type in PyArrow.