Class Row (2.23.1)

Row(key: bytes, cells: list[google.cloud.bigtable.data.row.Cell])

Model class for row data returned from server

Does not represent all data contained in the row, only data returned by a query. Expected to be read-only to users, and written by backend

Can be indexed: cells = row["family", "qualifier"]

Methods

Row

Row(key: bytes, cells: list[google.cloud.bigtable.data.row.Cell])

Initializes a Row object

Row objects are not intended to be created by users. They are returned by the Bigtable backend.

__contains__

__contains__(item)

Implements in operator

Works for both cells in the internal list, and family or (family, qualifier) pairs associated with the cells

__eq__

__eq__(other)

Implements == operator

__getitem__

Implements [] indexing

Supports indexing by family, (family, qualifier) pair, numerical index, and index slicing

__iter__

__iter__()

Allow iterating over all cells in the row

__len__

__len__()

Implements len() operator

__ne__

__ne__(other) -> bool

Implements != operator

__str__

__str__() -> str

Human-readable string representation

{
  (family='fam', qualifier=b'col'): [b'value', (+1 more),],
  (family='fam', qualifier=b'col2'): [b'other'],
}

get_cells

get_cells(
    family: typing.Optional[str] = None,
    qualifier: typing.Optional[typing.Union[str, bytes]] = None,
) -> list[google.cloud.bigtable.data.row.Cell]

Returns cells sorted in Bigtable native order:

  • Family lexicographically ascending
  • Qualifier ascending
  • Timestamp in reverse chronological order

If family or qualifier not passed, will include all

Can also be accessed through indexing: cells = row["family", "qualifier"] cells = row["family"]