← Back to Glossary

CSV

CSV (Comma-Separated Values) is a simple, text-based file format used to store tabular data.

CSV (Comma-Separated Values) is a simple, text-based file format used to store tabular data. Each line in a CSV file represents a row, with individual values separated by commas. This format is widely supported by spreadsheet applications, databases, and data processing tools, making it a popular choice for data exchange and storage. CSV files are human-readable and can be easily edited with a text editor.

In DuckDB, you can work with CSV files using the read_csv function. For example:

Related terms

FAQS

CSV (Comma-Separated Values) is a simple text format for tabular data where each line is a row and values are separated by commas. It's human-readable and widely supported for data exchange.

Use read_csv, for example SELECT * FROM read_csv('data.csv', auto_detect=true);, which reads the file and automatically detects column types.

CSV is ideal for small-to-medium datasets and as an intermediate format for import/export in pipelines. For large analytical workloads, columnar formats like Parquet are more efficient.