What is CSV?
CSV is a plain text format for storing tabular data where each line represents a data record. Fields within each record are separated by commas (or other delimiters). Despite its simplicity, CSV has become the universal standard for data exchange.
CSV files can be opened in any text editor and are supported by virtually every spreadsheet application, database system, and programming language. This universal compatibility makes CSV the de facto standard for importing and exporting data.
History
CSV emerged in the early days of computing as a simple way to export data from databases. The format gained popularity because it required no special software and could be read by humans and machines alike.
Key Milestones
- 1972: IBM FORTRAN uses comma-separated format
- 1983: Lotus 1-2-3 popularizes CSV for spreadsheets
- 1987: Microsoft Excel adds CSV import/export
- 2005: RFC 4180 formalizes CSV standard
- 2013: W3C recommends CSV for open data
Key Features
Core Capabilities
- Plain Text: Human-readable, no special software required
- Universal Compatibility: Supported by every major platform
- Simple Structure: Easy to generate and parse
- Lightweight: Minimal overhead, small file sizes
- Flexible Delimiters: Can use commas, tabs, semicolons
- UTF-8 Support: International character support
Common Use Cases
Data Migration
Transferring data between database systems
Spreadsheet Exchange
Sharing data between Excel, Google Sheets, etc.
Data Export
Exporting reports and analytics data
Data Science
Loading datasets for analysis and ML
Advantages
- Universally compatible with all platforms
- Simple format, easy to understand and use
- Small file size, no overhead
- Human-readable in text editors
- Supported by every programming language
- Perfect for data import/export
Disadvantages
- No standard for data types (everything is text)
- No built-in data validation
- Problems with commas in data
- No formatting or styling support
- Inconsistent delimiter handling across tools
- Limited support for complex data structures
Technical Information
Format Specifications
| Specification | Details |
|---|---|
| File Extension | .csv |
| MIME Type | text/csv |
| Standard | RFC 4180 |
| Character Encoding | UTF-8, ASCII |
| Delimiter | Comma (,) or other |
| Structure | Plain text |
Common Tools
- Spreadsheet: Excel, Google Sheets, LibreOffice Calc
- Database: MySQL, PostgreSQL, SQL Server
- Programming: Python pandas, R, JavaScript