astropy:docs

Row

class astropy.table.Row(table, index)[source] [edit on github]

Bases: object

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 1 of table
 values=(2, 4)
 dtype=[('a', '<i4'), ('b', '<i4')]>
>>> row['a']
2
>>> row[1]
4

Attributes Summary

colnames
columns
data
dtype
index
meta
table

Attributes Documentation

colnames
columns
data
dtype
index
meta
table

Page Contents