DuckDB
In-process analytical SQL database that queries Parquet, CSV and pandas data without a server.
Official Documentation ↗duckdb 0.10+ / Python 3.9+. Check the official docs for the latest API surface.Installation
pip install duckdbMethods
No methods match this filter.
Overview
DuckDB is an embedded analytical database. It runs in-process, stores data in columnar form, and can query Parquet, CSV, pandas and Arrow data through SQL without a separate server.
Core Methods
connect opens a database, sql and execute run statements, and helper functions like read_parquet and read_csv_auto scan files. Results convert to dataframes or Arrow with one call.
Usage Notes
Use it for local analytics and data preparation, push predicates and projections so columnar scans stay cheap, and switch to memory or a file depending on persistence needs.
Common Pitfalls
It is optimized for read-heavy analytics, not high-concurrency transactional writes. Loading everything into memory can exhaust RAM, so stream or filter large inputs. Naming a dataframe in SQL requires the object to be visible to the connection.
FAQ
- When is DuckDB a good fit?
- For analytical queries over local files and dataframes where a server database is overkill. It excels at columnar scans, joins and aggregations over Parquet and CSV.
- How does it differ from SQLite?
- SQLite targets transactional row storage, while DuckDB targets analytical columnar workloads. DuckDB reads Parquet and CSV natively and vectorizes aggregation.
- Can it query pandas or Arrow data?
- Yes. DuckDB can scan pandas dataframes and Arrow tables by name, letting you mix in-memory objects with files in one SQL query.
Report a problem with this API docOpens a pre-filled issue on GitHub.