csv Tutorial

csv is an acronym that stands for comma-separated values. A csv file is plain text however the characters may be encoded in any of a variety of ways. Each line in such a file represents a single record. A csv file’s contents are to be understood as the contents of a table in which each record represents one row of the tables. Although the acronym indicates that the values in lines are separated by commas they may, in fact, be separated by any character, and string values may be escaped by, for instance, apostrophes or double quotation marks. Often the first line of a csv file is formatted is the same way as subsequent lines but contains identifiers for the data in them; in these files this first line provides headers for the table represented by the file.

csv files are heavily used for storing and transmitting data. Most full-blown languages and systems include, or provide access to, means for parsing lines within such files for their values.