table#
- class pylibcudf.table.Table(list columns)#
A list of columns of the same size.
- Parameters:
- columnslist
The columns in this table.
Methods
columns
(self)The columns in this table.
from_arrow
(obj, DataType dtype)Create a Table from an Arrow-like object using the Arrow C data interface.
num_columns
(self)The number of columns in this table.
num_rows
(self)The number of rows in this table.
shape
(self)The shape of this table
- static from_arrow(obj: ArrowLike, DataType dtype: DataType | None = None) Table #
Create a Table from an Arrow-like object using the Arrow C data interface.
This method supports constructing a pylibcudf.Table from an object that implements one of the Arrow C data interface protocols, such as:
__arrow_c_device_array__: Returns a tuple of (ArrowSchema, ArrowDeviceArray) representing columnar device memory.
__arrow_c_stream__: Returns an ArrowArrayStream pointer representing a stream of host columnar batches.
__arrow_c_device_stream__: Not yet implemented.
__arrow_c_array__: Not yet implemented.
- Parameters:
- objArrow-like type
An object implementing one of the Arrow C data interface methods.
- dtype: DataType
The pylibcudf data type.
- Returns:
- Table
A Table constructed from the Arrow-like input.
- Raises:
- NotImplementedError
If the input is a device or host stream not yet supported. If the dtype argument is not None.
- ValueError
If the input does not implement a supported Arrow C interface.