Column object#
- class legate_dataframe.lib.core.column.LogicalColumn(obj: Any)#
Logical column distributed between legate nodes
Underlying a logical column is a logical array. The column doesn’t own the array, a logical array can be part of multiple columns.
- add_as_next_task_input(self, task: AutoTask) None #
Add a logical column to the next input task argument
This should match a call to get_next_input<PhysicalColumn>() by a legate task.
Note
The order of “add_next_*” calls must match the order of the corresponding “get_next_*” calls.
- Parameters:
task – The legate task to add the argument.
- add_as_next_task_output(self, task: AutoTask) None #
Add a logical column to the next output task argument
This should match a call to get_next_input<PhysicalColumn>() by a legate task.
Note
The order of “add_next_*” calls must match the order of the corresponding “get_next_*” calls.
- Parameters:
argument. (The legate task to add the)
- dtype(self) DtypeObj #
Returns the cudf data type of the row elements
- Return type:
The cudf data type
- static empty_like_logical_column(LogicalColumn col) LogicalColumn #
Create a new unbounded column from an existing column.
- Parameters:
other (LogicalColumn) – The prototype column.
- Return type:
The new unbounded column with the type and nullable equal other
- static from_cudf(Column col) LogicalColumn #
Create a logical column from a local cudf column.
This call blocks the client’s control flow and scatter the data to all legate nodes.
- Parameters:
col – cudf column
- Return type:
New logical column
- get_logical_array(self) LogicalArray #
Return the underlying logical array
- Return type:
The underlying logical array
- num_rows(self) int #
Returns the number of rows.
- Return type:
The number of rows
- Raises:
RuntimeError – if column is unbound
- repr(self, size_t max_num_items=30) str #
Return a printable representational string
- Parameters:
max_num_items (int) – Maximum number of items to include before items are abbreviated.
- Return type:
Printable representational string
- to_cudf(self) cudfColumn #
Copy the logical column into a local cudf column
This call blocks the client’s control flow and fetches the data for the whole column to the current node.
- Return type:
A cudf column, which own the data.