Polars DataFrame Guide
A skill that helps Claude write fast, idiomatic Polars code using its expression API, lazy engine, and pandas migration mappings.
Data & AnalyticsIntermediate★ 33,030⑂ 3,248AI score 9/10Last updated: Aug 9, 2026
What it does
- Guides installation (
uv pip install "polars==1.41.2") plus optional extras for Excel, databases, cloud storage, and GPU. - Writes idiomatic core operations:
select,filter,with_columns,group_by().agg(). - Explains when to use eager DataFrames vs lazy LazyFrames, with predicate/projection pushdown and streaming collection for out-of-core data.
- Provides a pandas → Polars operation mapping table for migrating existing code.
- Covers I/O across CSV, Parquet, JSON, Excel, databases, and S3/GCS/Azure, plus joins, concat, pivot, and unpivot.
- Ships six reference docs under
references/that are loaded on demand for deeper topics.
Who it's for
- Data analysts and engineers hitting pandas performance walls on large CSV/Parquet files.
- Python developers rewriting ETL pipelines with the Polars expression API.
- Newcomers to Polars syntax, especially
over()window functions,when/then, and regex column selection.
Example uses
- "Convert this pandas script to Polars" → maps
assigntowith_columns,groupbytogroup_by, etc. - "Aggregate average salary per city from a 30GB CSV" → builds a
scan_csvlazy pipeline with early column selection andcollect(engine="streaming"). - "Add group averages and ranks without collapsing rows" → generates window expressions like
pl.col("age").mean().over("city").
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/polars/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/polars folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/polars/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/sas && mkdir -p ~/.claude/skills && cp -r /tmp/sas/skills/polars ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repository:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r scientific-agent-skills/skills/polars ~/.claude/skills/ - On Python 3.10+, install the library:
uv pip install "polars==1.41.2"(orpip install "polars==1.41.2"). - For Excel/database/cloud support:
uv pip install "polars[excel,database,fsspec,pandas,numpy]==1.41.2" - Restart Claude Code and ask something like "use Polars to aggregate this CSV" to trigger the skill.
View source on GitHub ↗License: MIT