Panel | ||||
---|---|---|---|---|
| ||||
Metview incorporates functionality to read, process and visualise data stored in ASCII table files. The Table Reader icon provides the means to generate Macro code to parse a table file. Once in memory, Macro's vector functions can be used to manipulate the data values. For visualisation, use the Table Visualiser icon. For a full list and details of functions and operators on vectors, see Table Functions and Operators on Tables. |
Format Details
Many varieties of ASCII tables can be handled, but the simplest (and default) is the comma-separated value (CSV) style as shown in the example below:
...
my_table = read_table
(
table_delimiter : " ",
table_combine_delimiters : "on",
table_header_row : 0,
table_data_row_offset : 3,
table_filename : "table_with_metadata.txt",
table_meta_data_rows : 1
)
for i = 1 to count(my_table) do # print each column
print(name(my_table, i), ' : ', values(my_table, i))
end for
keys = metadata_keys(my_table)
print(keys)
print(metadata_value(my_table, keys)) # print all keys/values
print(metadata_value(my_table, 'type'))
...