ray.data.row.TableRow#

class ray.data.row.TableRow(row: Any)[source]#

A dict-like row of a tabular Dataset.

This implements the dictionary mapping interface, but provides more efficient access with less data copying than converting Arrow Tables or Pandas DataFrames into per-row dicts. This class must be subclassed, with subclasses implementing __getitem__, __iter__, and __len__.

Concrete subclasses include ray.data._internal.arrow_block.ArrowRow and ray.data._internal.pandas_block.PandasRow.

PublicAPI: This API is stable across Ray releases.

__init__(row: Any)[source]#

Construct a TableRow (internal API).

Parameters

row – The tabular row that backs this row mapping.

Methods

__init__(row)

Construct a TableRow (internal API).

as_pydict()

Convert to a normal Python dict.

get(key[, default])

Retrieve the corresponding layout by the string key.

items()

keys()

values()