The class is the specific implementation of PandasDataframe class using Ray distributed engine. It serves as an intermediate level between cuDFQueryCompiler and cuDFOnRayDataframePartitionManager.

Public API#

class modin.core.execution.ray.implementations.cudf_on_ray.dataframe.cuDFOnRayDataframe(partitions, index=None, columns=None, row_lengths=None, column_widths=None, dtypes=None)#

The class implements the interface in PandasOnRayDataframe using cuDF.

  • partitions (np.ndarray) – A 2D NumPy array of partitions.

  • index (sequence) – The index for the dataframe. Converted to a pandas.Index.

  • columns (sequence) – The columns object for the dataframe. Converted to a pandas.Index.

  • row_lengths (list, optional) – The length of each partition in the rows. The “height” of each of the block partitions. Is computed if not provided.

  • column_widths (list, optional) – The width of each partition in the columns. The “width” of each of the block partitions. Is computed if not provided.

  • dtypes (pandas.Series, optional) – The data types for the dataframe columns.


Synchronize labels by applying the index object (Index or Columns) to the partitions eagerly.


axis ({0, 1, None}, default: None) – The axis to apply to. If None, it applies to both axes.

take_2d_labels_or_positional(row_labels: Optional[List[Hashable]] = None, row_positions: Optional[List[int]] = None, col_labels: Optional[List[Hashable]] = None, col_positions: Optional[List[int]] = None)#

Lazily select columns or rows from given indices.

  • row_labels (list of hashable, optional) – The row labels to extract.

  • row_positions (list of int, optional) – The row positions to extract.

  • col_labels (list of hashable, optional) – The column labels to extract.

  • col_positions (list of int, optional) – The column positions to extract.


A new cuDFOnRayDataframe from the mask provided.

Return type:



If both row_labels and row_positions are provided, a ValueError is raised. The same rule applies for col_labels and col_positions.