polars

Polars fast DataFrame library. Use for fast data processing.

7 stars

Best use case

polars is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Polars fast DataFrame library. Use for fast data processing.

Teams using polars should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/polars/SKILL.md --create-dirs "https://raw.githubusercontent.com/G1Joshi/Agent-Skills/main/skills/ai-ml/polars/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/polars/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How polars Compares

Feature / AgentpolarsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Polars fast DataFrame library. Use for fast data processing.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Polars

Polars is the fast successor to Pandas. Written in Rust, query-optimized, and parallelized. v1.0 (2024) signaled production readiness.

## When to Use

- **Performance**: 10-100x faster than Pandas on large data.
- **Lazy Evaluation**: Define a query plan and execute it efficiently (`.collect()`).
- **Streaming**: Process datasets larger than RAM.

## Core Concepts

### Lazy API (`.lazy()`)

Builds a query plan. Polars optimizes it (predicate pushdown) before reducing it.

### Expressions

`pl.col("a").sum()` is an expression, not a direct calculation.

### Compatibility

Can convert to/from Pandas/PyArrow zero-copy.

## Best Practices (2025)

**Do**:

- **Use Lazy Mode**: `df.lazy().filter(...).collect()`.
- **Use `scan_parquet`**: Don't load the whole file; scan it.
- **Use GPU engine**: Polars has experimental NVIDIA RAPIDS support.

**Don't**:

- **Don't treat it like Pandas**: The API is different (`axis=1` doesn't exist; use expressions).

## References

- [Polars Documentation](https://pola.rs/)