polars
Skill by K-Dense-AI
Polars is an agent skill for the Polars DataFrame library in Python. It covers expression-based data work, lazy queries, streaming, and pandas migration for ETL and analytics.
Install polars
Built from the published package, never by AI.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/polars ~/.claude/skills/polarsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/scientific-agent-skills/skills/polars ~/.gemini/antigravity-cli/skills/polarsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Polars is an agent skill for the Polars DataFrame library for Python and Rust, published by K-Dense-AI. It guides an assistant through expression-based data manipulation, including select, filter, with_columns, group_by, joins, and window functions with over(). It also covers reading and writing CSV, Parquet, and JSON files.
The skill explains lazy evaluation with LazyFrame, where predicate and projection pushdown optimize a query before collect. It describes streaming execution, sink_parquet for direct file output, and Arrow interoperability. It also includes a pandas migration guide and notes on null handling and reproducible summaries, aimed at data engineers and analysts doing ETL or analytics work.
Written from the project's SKILL.md and checked against it.
What it can do
- Expression-based transformsBuilds select, filter, and with_columns logic using pl.col expressions.
- Lazy queriesUses scan_csv and LazyFrame so the query plan is optimized before collect.
- Group by and window functionsRuns aggregations and over() calculations that keep the original row count.
- Joins and reshapingCovers joins, concat modes, pivot, and unpivot.
- File I/OReads and writes CSV, Parquet, and JSON, and notes Excel and cloud options.
- Streaming executionUses engine="streaming" and sink_parquet for larger datasets.
- Pandas migrationMaps common pandas operations to their Polars equivalents.
- Scientific validation checksAdvises on null versus NaN, join cardinality, and string IDs with leading zeros.
What you need
- Python 3.10 or newer
- uv package installer
- Optional extras for Excel, database, cloud, pandas, NumPy, or GPU integrations
- Provider setup for cloud, GPU, BigQuery, or remote database recipes
Try asking
- Convert this pandas groupby and assign code to Polars
- Write a lazy Polars query that filters and selects columns from a CSV
- Check join cardinality and null keys before merging these two tables
Good to know
- Cloud, GPU, BigQuery, and remote database recipes are illustrative and need provider setup.
- Code fragments using undefined columns, paths, or ... need adaptation to the dataset.
- A DataFrame returned from streaming collect must still fit in memory.
- Successful execution does not validate the scientific assumptions of an analysis.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/polars/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Read
-
SKILL.md13 KB -
references/best_practices.md15 KB -
references/core_concepts.md9 KB -
references/io_guide.md16 KB -
references/operations.md14 KB
Show all 8 files
-
references/pandas_migration.md13 KB -
references/review.md5 KB -
references/transformations.md14 KB
Alternatives to polars
All alternatives →Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.
Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.
Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.
Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.
Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.
Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.
Compare with kaggle-cli, bigquery-bigframes or data-loading
polars: common questions
Which Polars version does this skill cover?
The source says it was reviewed against Polars 1.44.2, which is the upstream version listed in its metadata.
When should I use lazy evaluation with this skill?
The source recommends LazyFrame for large datasets, complex query pipelines, and cases where only some columns or rows are needed.
Does this skill help with migrating pandas code?
Yes. It includes a pandas migration guide and a table that maps common pandas operations to Polars.
How do I install polars?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is polars free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is polars safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to polars?
Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.
