[Avg. reading time: 3 minutes]
Common Data Formats
CSV (Comma-Separated Values)
A simple text-based format where each row represents a record and each column is separated by a comma.
Example
name,age,city
Rachel,30,New York
Phoebe,25,San Francisco
Use Cases
- Data exchange between systems
- Lightweight storage
- Import/export from databases and spreadsheets
Pros
- Human-readable
- Easy to generate and parse
- Supported by almost every tool
Cons
- No support for nested or complex structures
- No schema enforcement
- No data types, everything is text
- Inefficient for very large datasets
TSV (Tab-Separated Values)
Similar to CSV, but uses tab characters instead of commas as delimiters.
Example
name age city
Rachel 30 New York
Phoebe 25 San Francisco
Use Cases
- Same use cases as CSV
- Useful when data contains commas frequently
Pros
- Simple and human-readable
- Avoids issues with commas inside values
- Easy to parse
Cons
- No schema enforcement
- No nested or complex data support
- Same scalability and performance issues as CSV