Skip to content
Automation
Skill

/polars

Polars DataFrame library for high-performance data manipulation. Lazy/eager execution, expressions, I/O (CSV, Parquet, JSON), aggregations, joins, string/datetime ops, pandas interop. Use for Polars DataFrames or reading/writing Parquet files.

From plugin
auto-empirical-research-skills
4.9k200 skills

Claude Code

$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill polars --agent claude-code

SKILL.md

polars.SKILL.md
name: polars
description: >-
  Polars DataFrame library for high-performance data manipulation. Lazy/eager execution, expressions, I/O (CSV, Parquet, JSON), aggregations, joins, string/datetime ops, pandas interop. Use for Polars DataFrames or reading/writing Parquet files.
metadata:
  audience: research-coders
  domain: python-library
  library-version: "1.x"
  skill-last-updated: "2026-03-26"

Polars Skill

Polars DataFrame library for high-performance data manipulation in Python. Covers lazy/eager execution, expressions, I/O (CSV, Parquet, JSON, database), aggregations, joins, string/datetime operations, pandas/NumPy interop, and performance optimization. Use when working with Polars DataFrames, migrating from pandas, reading Parquet files, or optimizing data pipeline performance.

Comprehensive skill for high-performance data manipulation with Polars. Use decision trees below to find the right guidance, then load detailed references.

What is Polars?

Polars is a **fast** DataFrame library for Python (and Rust):

  • **Fast**: Written in Rust, optimized for modern CPUs with SIMD and parallelism
  • **Lazy Evaluation**: Build query plans that get optimized before execution
  • **Expressive**: Powerful expression API for complex transformations
  • **Memory Efficient**: Columnar format, streaming for larger-than-memory data
  • **No Dependencies**: Pure Rust core, no NumPy/Pandas required

Version Notes

This skill targets **Polars 1.x** (tested with 1.37.1). Key changes from 0.x:

  • `apply` renamed to `map_elements` (0.19+)
  • `groupby` renamed to `group_by` (0.19+)
  • `melt` renamed to `unpivot` (1.0+)
  • Streaming engine improvements in 1.x
  • `pl.Utf8` is now `pl.String` (1.0+, Utf8 still works as alias)

How to Use This Skill

Reference File Structure

Each topic in `./references/` contains focused documentation:

| File | Purpose | When to Read | |------|---------|--------------| | `quickstart.md` | Installation, concepts, first DataFrame | Starting with Polars | | `dataframes-series.md` | Creation, selection, filtering, modification | Basic data manipulation | | `io-data.md` | CSV, Parquet, JSON, database I/O | Loading/saving data | | `expressions.md` | Expression system, contexts, chaining | Understanding Polars idioms | | `aggregations-grouping.md` | GroupBy, window functions, statistics | Summarizing data | | `joins-concat.md` | Joins, concatenation, pivot/unpivot | Combining DataFrames | | `strings-datetime-categorical.md` | String ops, datetime, categoricals | Type-specific operations | | `performance.md` | Lazy execution, optimization, anti-patterns | Making code faster | | `interop.md` | Pandas, NumPy, PyArrow, DuckDB | Working with other tools | | `gotchas.md` | Common errors, anti-patterns, migration | Debugging issues |

Reading Order

1. **New to Polars?** Start with `quickstart.md` then `expressions.md` 2. **Coming from Pandas?** Read `quickstart.md`, `expressions.md`, then `interop.md` 3. **Performance issues?** Check `performance.md` first

Quick Decision Trees

"I need to get started"

Getting started?
โ”œโ”€ Install Polars โ†’ ./references/quickstart.md
โ”œโ”€ Create first DataFrame โ†’ ./references/quickstart.md
โ”œโ”€ Understand lazy vs eager โ†’ ./references/quickstart.md
โ”œโ”€ Learn expression syntax โ†’ ./references/expressions.md
โ””โ”€ Coming from Pandas โ†’ ./references/interop.md

"I need to load or save data"

Loading/saving data?
โ”œโ”€ Read CSV file โ†’ ./references/io-data.md
โ”œโ”€ Read Parquet (recommended) โ†’ ./references/io-data.md
โ”œโ”€ Read JSON/NDJSON โ†’ ./references/io-data.md
โ”œโ”€ Read from database โ†’ ./references/io-data.md
โ”œโ”€ Read multiple files (glob) โ†’ ./references/io-data.md
โ”œโ”€ Write to file โ†’ ./references/io-data.md
โ””โ”€ Larger-than-memory data โ†’ ./references/performance.md

"I need to filter or select data"

Filtering/selecting?
โ”œโ”€ Select columns by name โ†’ ./references/dataframes-series.md
โ”œโ”€ Select by pattern/regex โ†’ ./references/dataframes-series.md
โ”œโ”€ Select by data type โ†’ ./references/dataframes-series.md
โ”œโ”€ Filter rows by condition โ†’ ./references/dataframes-series.md
โ”œโ”€ Filter with multiple conditions โ†’ ./references/dataframes-series.md
โ”œโ”€ Handle null values โ†’ ./references/dataframes-series.md
โ””โ”€ Add/modify columns โ†’ ./references/dataframes-series.md

"I need to aggregate or group data"

Aggregating data?
โ”œโ”€ Basic statistics (sum, mean, etc.) โ†’ ./references/aggregations-grouping.md
โ”œโ”€ Group by columns โ†’ ./references/aggregations-grouping.md
โ”œโ”€ Multiple aggregations โ†’ ./references/aggregations-grouping.md
โ”œโ”€ Window functions (over) โ†’ ./references/aggregations-grouping.md
โ”œโ”€ Rolling/moving averages โ†’ ./references/aggregations-grouping.md
โ”œโ”€ Cumulative operations โ†’ ./references/aggregations-grouping.md
โ””โ”€ Ranking within groups โ†’ ./references/aggregations-grouping.md

"I need to combine DataFrames"

Combining data?
โ”œโ”€ Join two DataFrames โ†’ ./references/joins-concat.md
โ”œโ”€ Left/right/outer join โ†’ ./references/joins-concat.md
โ”œโ”€ Anti-join (not in) โ†’ ./references/joins-concat.md
โ”œโ”€ Concatenate vertically โ†’ ./references/joins-concat.md
โ”œโ”€ Pivot (long to wide) โ†’ ./references/joins-concat.md
โ””โ”€ Unpivot/melt (wide to long) โ†’ ./references/joins-concat.md

"I need better performance"

Performance issues?
โ”œโ”€ Use lazy evaluation โ†’ ./references/performance.md
โ”œโ”€ Avoid row iteration โ†’ ./references/performance.md
โ”œโ”€ Reduce memory usage โ†’ ./references/performance.md
โ”œโ”€ Process large files โ†’ ./references/performance.md
โ”œโ”€ Optimize query plan โ†’ ./references/performance.md
โ””โ”€ Common anti-patterns โ†’ ./references/performance.md

"Something isn't working"

Having issues?
โ”œโ”€ Type errors โ†’ ./references/gotchas.md
โ”œโ”€ Null handling โ†’ ./references/gotchas.md
โ”œโ”€ Expression context errors โ†’ ./references/gotchas.md
โ”œโ”€ String operations โ†’ ./references/strings-datetime-categorical.md
โ”œโ”€ Date parsing issues โ†’ ./references/strings-datetime-categorical.md
โ”œโ”€ Performance problems โ†’ ./references/gotchas.md
โ”œโ”€ Pandas migratio
Read more
@brycewang-stanford
Ships withauto-empirical-research-skills

## ๐Ÿ”ฅ ๅŠ›่ ยท StatsPAI โ€” Stata ไธŽ R ็š„ Python ๅนณๆ›ฟ๏ผŒไธบ AI Agent ่€Œ็”Ÿ ๐Ÿ” Stata / R ๅนณๆ›ฟ๏ผšreghdfeใ€csdidใ€rdrobustใ€synthใ€fixestใ€did ็ญ‰ๅธธ็”จๅ‘ฝไปคๅœจ Python ไธญไธ€็ซ™ๅผๆ›ฟไปฃ๏ผŒไธ€ไธช import statspai as sp ๆžๅฎš DID / RD / IV / SCM / DML / matching ๐Ÿค– ้ขๅ‘ Agent ่ฎพ่ฎก๏ผš็ป“ๆž„ๅŒ–็ป“ๆžœๅฏน่ฑก + ๅ†…็ฝฎ MCP Server๏ผŒClaude / Codex

4.9k200 skills
Get the whole plugin

Stars on GitHub

Momentum

stars in total
4.9k
Star history of brycewang-stanford/Auto-Empirical-Research-Skills on GitHub, a chart by star-history.com

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, andโ€ฆ

n8n2w209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also coversโ€ฆ

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, fillingโ€ฆ

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use whenโ€ฆ

@nanocoai@nanocoaiInstall Skill

Questions about polars.

Which coding agents can use polars?
polars installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.