DuckDB 2 · From Python

Query a CSV file

Read a CSV directly in SQL. DuckDB detects types and headers automatically.

duckdb.sql("SELECT * FROM read_csv('sales.csv') LIMIT 5").show()

Official DuckDB 2 documentation

More from python commands

All from python commands · DuckDB 2 cheatsheet

Was this page helpful?