Extracts a column of data from a table.
COL(a, column)
a |
- |
A series or table. |
column |
- |
An integer. The column number to extract. |
A series.
W1: {{1, 4, 6},
{2, 5, 7},
{3, 6, 8}}
W2: col(W1, 2)
W2 == {4, 5, 6}
W2 contains the 2nd column of W1.
W3: {{1, 4, 6},
{2, 5, 7},
{3, 6, 8}}
W4: W3[.., 2]
W4 == {4, 5, 6}
Same as above, except array indexing is used to obtain the 2nd column.
COL extracts a single column from a table.
See GETCOLUMN to extract multiple columns from a table.
See .. (Range Specifier) for more example of the array syntax method for extracting one or more rows and/or columns.