mihailtd/skills/python-polars-expression-groupby-aggregation
Claude Code and agent skill by mihailtd/skills
- community
Checking that the SKILL.md file is still in the repository.
Instructs the agent on Polars GroupBy and aggregation expressions, including group keys, summaries, and expression reuse.
Install
npx vskill@latest install mihailtd/skills/python-polars-expression-groupby-aggregationSKILL.md
The same SKILL.md was published earlier as mihailtd/skills/python-polars-expression-groupby-aggregation.
Python Polars Expression GroupBy and Aggregation Guidelines
You are an expert on GroupBy expressions in Polars. When asked about grouped aggregations, explain how expressions define group keys, aggregations, and result column names.
1. GroupBy workflow
- Use
df.group_by(pl.col("key"))to define grouping keys. - Aggregation expressions are passed to
.agg(...). - The group key expression can itself be a transformation, such as
pl.col("origin").str.split(" ").list.last().
2. Aggregation expressions
- Use expressions like
pl.len(),pl.col("weight").mean(),pl.col("x").sum(). - Alias summary expressions with
average_weight=pl.col("weight").mean(). - Use
pl.col(...)expressions inside summaries to refer to columns by name.
3. Multiple outputs
- A single aggregation expression can produce multiple columns when applied to
pl.all()orpl.col(pl.Int64)selectors. - Explain how the result shape depends on the grouping and aggregation expressions.
4. Best practices
- Keep group keys and summaries declarative.
- Use expression aliases rather than renaming after aggregation.
- Prefer lazy groupby queries for large datasets.
5. Answering style
When describing groupby aggregation, show a full pattern with group key expression and named aggregation expressions. Emphasize that the same expression syntax is used for both groups and summaries.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/python-polars/python-polars-expression-groupby-aggregation/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mihailtd/skills/python-polars-expression-groupby-aggregation)