On this page:
read_  csv
8.14.0.4

9 The csv library🔗ℹ

This library provides a function for reading comma-separated values (CSV) files.

procedure

read_csv(input: str?): VecC[VecC[AnyC]

Reads the CSV file input and returns its contents as a vector of vectors. The outer vector has one element for each row in the file, and each element has one element for each column in the row.

For example, a CSV file containing the following:

state,initial,capital

Illinois,IL,Springfield

Massachusetts,MA,Boston

Missouri,MO,Jefferson City

would be read into:

[['state', 'initial', 'capital'],
 ['Illinois', 'IL', 'Springfield'],
 ['Massachusetts', 'MA', 'Boston'],
 ['Missouri', 'MO', 'Jefferson City']]