Comma Separated Values
- A plain-text tabular format where fields are separated by commas and each line is a row.
- Widely supported for importing and exporting between applications and programming languages.
- Simple and flexible for adding/removing rows and columns, but does not support complex data types or explicit data typing.
Definition
Section titled “Definition”Comma separated values (CSV) is a file format used to store data in tabular form. Data are stored in plain text, with values separated by commas; each line represents a row and each comma-separated value represents a column.
Explanation
Section titled “Explanation”CSV is a simple, widely used format for transferring and storing tabular data. Because it is plain text, CSV files can be opened and edited in any text editor, and many applications and programming languages provide built-in support for importing and exporting CSV data. The format is flexible: it can represent simple lists up to more complex datasets and allows easy addition or removal of columns and rows. However, CSV does not support complex data types (for example, images or rich text) and does not include a built-in mechanism to specify data types, which can cause inconsistencies or errors during import/export.
Examples
Section titled “Examples”Student names and GPAs
Section titled “Student names and GPAs”First column: student’s name; second column: GPA.
| Name | GPA |
|---|---|
| John | 3.8 |
| Jane | 3.9 |
| Mike | 3.7 |
Product sales
Section titled “Product sales”First row shown as header.
| Product | Sales |
|---|---|
| Toothpaste | 1000 |
| Shampoo | 1500 |
| Conditioner | 1200 |
Use cases
Section titled “Use cases”- Data transfer between different applications.
- Storing and transferring tabular data for analysis or manipulation.
Notes or pitfalls
Section titled “Notes or pitfalls”- CSV does not support complex data types such as images or rich text.
- There is no built-in way in CSV to specify data types, which can lead to inconsistencies and errors when importing or exporting data.
Related terms
Section titled “Related terms”- CSV (abbreviation)
- Plain text
- Tabular data
- Text editor
- Programming languages