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 by family and qualifier to get cells in the row::
cells = row["family", "qualifier"]
Methods
Row
Row
(
key
:
bytes
,
cells
:
list
[
google
.
cloud
.
bigtable
.
data
.
row
.
Cell
])
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
bool
__eq__
__eq__
(
other
)
Implements ==
operator
bool
__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
Iterator
__len__
__len__
()
Returns the number of cells in the row
int
__ne__
__ne__
(
other
)
-
> bool
Implements !=
operator
bool
__str__
__str__
()
-
> str
Human-readable string representation::
{
(family='fam', qualifier=b'col'): [b'value', (+1 more),],
(family='fam', qualifier=b'col2'): [b'other'],
}
str
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"]
ValueError
list[Cell]