datascience.tables.Table.column¶
-
Table.
column
(index_or_label)[source]¶ Return the values of a column as an array.
table.column(label) is equivalent to table[label].
>>> tiles = Table().with_columns( ... 'letter', make_array('c', 'd'), ... 'count', make_array(2, 4), ... )
>>> tiles.column('letter') array(['c', 'd'], dtype='<U1') >>> tiles.column(1) array([2, 4])
- Args:
- label (int or str): The index or label of a column
- Returns:
- An instance of
numpy.array
. - Raises:
ValueError
: When theindex_or_label
is not in the table.