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),
... )
>>> list(tiles.column('letter'))
['c', 'd']
>>> 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 the index_or_label is not in the table.