What is CSV?
CSV (Comma-Separated Values) is a simple file format used to store tabular data. Each line represents a row, and columns are separated by commas. It's one of the most widely used formats for data exchange between applications.
Advantages
- Simple and lightweight
- Human-readable plain text
- Universally supported (Excel, Sheets, databases)
- Easy to generate and parse
- Perfect for tabular data
Limitations
- No data type information
- No nested/hierarchical data
- No standard specification
- Encoding and delimiter issues
- Special characters need escaping
CSV Syntax Example
name,email,department,salary
John Doe,john@example.com,Engineering,75000
Jane Smith,jane@example.com,Marketing,65000
"Bob, Jr.",bob@example.com,Sales,55000Note: Fields containing commas should be enclosed in quotes.
Common CSV Uses
Data Export
Spreadsheets
Databases
Analytics
Migrations
Reporting