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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.