Table.from_rows
Table.from_rowsheaderrows
Group: Constants
Documentation
Creates a new table from a vector of column names and a vector of vectors specifying row contents.
Arguments
header: A list of texts specifying the column namesrows: A vector of vectors, specifying the contents of each table row. The length of each element ofrowsmust be equal in length toheader.
Examples
Create a table with 3 columns, named foo, bar, and baz, containing
[1, 2, 3], [True, False, True], and ['a', 'b', 'c'], respectively.
from Standard.Table import Table
example_from_rows =
header = [ 'foo' , 'bar' , 'baz' ]
row_1 = [ 1 , True , 'a' ]
row_2 = [ 2 , False , 'b' ]
row_3 = [ 3 , True , 'c' ]
Table.from_rows header [row_1, row_2, row_3]