class craftutils.wrap.dragons.Table.Row

A class to represent one row of a Table object.

A Row object is returned when a Table object is indexed with an integer or when iterating over a table:

>>> from astropy.table import Table
>>> table = Table([(1, 2), (3, 4)], names=('a', 'b'),
...               dtype=('int32', 'int32'))
>>> row = table[1]
>>> row
<Row index=1>
  a     b
int32 int32
----- -----
    2     4
>>> row['a']
2
>>> row[1]
4

Public members

Row(table, index)

Initialize self. See help(type(self)) for accurate signature.

__getitem__(item)
__setitem__(item, val)
__eq__(other)

Return self==value.

__ne__(other)

Return self!=value.

__array__(dtype=None)

Support converting Row to np.array via np.array(table).

keys()
values()
as_void()

Returns a read-only copy of the row values in the form of np.void or np.ma.mvoid objects. This corresponds to the object types returned for row indexing of a pure numpy structured array or masked array. This method is slow and its use is discouraged when possible.

__repr__()

Return repr(self).

__str__()

Return str(self).

Properties

property table
property index
property meta
property columns
property colnames
property dtype