Reading and writing CSV files

A CSV file is a comma-separated file. The data fields in each line are separated by commas, ,, or another delimiter, such as semicolons, ;. These files are the de-facto standard for exchanging small and medium amounts of tabular data. Such files are structured so that one line contains data about one data object, so we need a way to read and process the file line by line. As an example, we will use the Chapter 8\winequality.csv datafile, which contains 1,599 sample measurements, 12 data columns, such as pH and alcohol, per sample, separated by a semicolon. In the following screenshot, you can see the top 20 rows:

In general, the readdlm function from the DelimitedFiles package is used to read in the data from ...

Get Julia 1.0 Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.