Some text files contain tabular data separated by commas. This is a convenient way of creating structured data, instead of using proprietary, more complex formats such as Excel or others. These files are called Comma Separated Values, or CSV, files and most spreadsheet packages also export to it.
Reading CSV files
Getting ready
We've prepared a CSV file using the data for the 10 top movies by theatre attendance, as described by this page: http://www.mrob.com/pub/film-video/topadj.html.
We copied the first ten elements of the table into a spreadsheet program (Numbers) and exported the file as a CSV. The file is available in the GitHub repository in the Chapter04/documents directory as top_films.csv: