OmnisciOnNativeFramePartition

Public API

class modin.experimental.engines.omnisci_on_native.frame.partition.OmnisciOnNativeFramePartition(frame_id=None, pandas_df=None, arrow_table=None, length=None, width=None)

A partition of OmnisciOnNativeFrame frame.

Class holds either a pandas.DataFrame or pyarrow.Table.

Parameters
  • frame_id (str, optional) – A corresponding OmniSci table name or None.

  • pandas_df (pandas.DataFrame, optional) – Partition data in pandas format.

  • arrow_table (pyarrow.Table, optional) – Partition data in Arrow format.

  • length (int, optional) – Length of the partition.

  • width (int, optional) – Width of the partition.

frame_id

A corresponding OmniSci table name if partition was imported into OmniSci. Otherwise None.

Type

str

pandas_df

Partition data in pandas format.

Type

pandas.DataFrame, optional

arrow_table

Partition data in Arrow format. None for partitions holding pandas.DataFrame.

Type

pyarrow.Table

_length_cache

Length of the partition.

Type

int

_width_cache

Width of the partition.

Type

int

get()

Get partition data.

Returns

Return type

pandas.DataFrame or pyarrow.Table

classmethod put(obj)

Create partition from pandas.DataFrame or pandas.Series.

Parameters

obj (pandas.Series or pandas.DataFrame) – Source frame.

Returns

The new partition.

Return type

OmnisciOnNativeFramePartition

classmethod put_arrow(obj)

Create partition from pyarrow.Table.

Parameters

obj (pyarrow.Table) – Source table.

Returns

The new partition.

Return type

OmnisciOnNativeFramePartition

to_pandas()

Transform to pandas format.

Returns

Return type

pandas.DataFrame

wait()

Wait until the partition data is ready for use.

Returns

The partition that is ready to be used.

Return type

pandas.DataFrame