arkouda.pandas.row

Classes

Row

Dictionary-like representation of a single row in an Arkouda DataFrame.

Module Contents

class arkouda.pandas.row.Row(dict=None, /, **kwargs)[source]

Bases: collections.UserDict

Dictionary-like representation of a single row in an Arkouda DataFrame.

Wraps the column-to-value mapping for one row and provides convenient ASCII and HTML formatting for display.

Parameters:

data (dict) – Mapping of column names to their corresponding values for this row.

Examples

>>> import arkouda as ak
>>> from arkouda.pandas.row import Row
>>> df = ak.DataFrame({"x": ak.array([10, 20]), "y": ak.array(["a", "b"])})

Suppose df[0] returns {"x": 10, "y": "a}:

>>> row = Row({"x": 10, "y": "a"})
>>> print(row)
keys    values
------  --------
x       10
y       a