duckdb

Run in-process analytical SQL queries on Python DataFrames and files.

19|2|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/tondevrel/scientific-agent-skills --skill duckdb-tondevrel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: duckdb
Source: https://github.com/tondevrel/scientific-agent-skills/tree/main/skills/duckdb
Command: npx skills add https://github.com/tondevrel/scientific-agent-skills --skill duckdb-tondevrel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables users to perform complex SQL queries directly on their Python data structures (like Pandas DataFrames) and large files without needing a separate database server, significantly speeding up analytical tasks.

Core Features & Use Cases

  • In-Process SQL Database: Run SQL queries directly within your Python environment.
  • Direct File Querying: Query Parquet, CSV, and JSON files without explicit loading.
  • Seamless DataFrame Integration: Treat Pandas and Polars DataFrames as SQL tables.
  • Use Case: Analyze terabytes of Parquet data stored in cloud storage using SQL, join it with local Pandas DataFrames, and aggregate results efficiently, all within a single Python script.

Quick Start

Use the duckdb skill to query the 'sales.parquet' file and select all columns where the 'region' is 'North'.

Frequently Asked Questions about duckdb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run SQL queries on Pandas DataFrames in Python?

You can run SQL queries on Pandas DataFrames in Python by using an in-process analytical SQL database engine. This allows you to treat DataFrames as SQL tables, executing complex joins and aggregations directly within your Python environment without needing a separate database server.

Can I query large Parquet files directly without loading them into memory?

Querying large Parquet files directly without loading them entirely into memory is possible. The engine leverages columnar storage and vectorized execution to query Parquet, CSV, and JSON files directly, enabling efficient analysis of terabytes of data stored locally or in cloud storage.

What is the best way to analyze large CSV files with SQL in Python?

The best way to analyze large CSV files with SQL in Python is using an in-process OLAP database engine. It directly queries large CSV files, utilizing columnar storage and vectorized execution to optimize complex analytical SQL operations like aggregations without requiring explicit data loading.

Does DuckDB work with Polars DataFrames for SQL operations?

DuckDB works seamlessly with Polars DataFrames for SQL operations. It provides an in-process analytical SQL database that treats both Pandas and Polars DataFrames as SQL tables, allowing you to perform complex SQL operations like joins and aggregations across both frameworks.

Do I need a separate database server to run analytical SQL queries on local files?

You do not need a separate database server to run analytical SQL queries on local files. An in-process SQL database engine runs directly within your Python environment, allowing you to query files like Parquet and CSV and perform OLAP queries on in-memory data efficiently.

How do I join local Pandas DataFrames with cloud storage data using SQL?

You can join local Pandas DataFrames with cloud storage data using SQL by leveraging an in-process analytical SQL engine. It facilitates complex SQL operations like joins and aggregations, allowing you to analyze terabytes of Parquet data in cloud storage and join it with local DataFrames in a single script.