Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add param087/agent-ml-skills --skill pandas-patternsgit clone --depth 1 https://github.com/param087/agent-ml-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/param087/agent-ml-skills/pandas-patterns)<a href="https://agentmods.dev/skills/param087/agent-ml-skills/pandas-patterns"><img src="https://agentmods.dev/badge/skills/param087/agent-ml-skills/pandas-patterns.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.00721 |
| Opus 5 | $0.00019 | $0.00360 |
| Sonnet 5 | $0.00008 | $0.00144 |
| Haiku 4.5 | $0.00004 | $0.00072 |
Grade A, and why
pandas-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pandas Patterns
Overview
Most pandas pain comes from three things: chained indexing, row-wise apply, and ignoring dtypes/memory. This skill encodes the idioms that keep pandas correct and fast.
When to use
- Writing data-wrangling code.
- Code is slow, leaks memory, or throws
SettingWithCopyWarning. - Reviewing someone's pandas for correctness.
Core rules
- Assign with
.loc, never chained.df.loc[df["age"] > 30, "segment"] = "senior" # correct # df[df["age"] > 30]["segment"] = "senior" # WRONG: SettingWithCopyWarning, no-op risk - Vectorize instead of
apply(axis=1). Row-wise apply is a Python loop.df["bmi"] = df["weight"] / df["height"] ** 2 # fast # df.apply(lambda r: r.weight / r.height**2, axis=1) # 100x slower - Use
np.select/np.wherefor conditional columns.import numpy as np df["tier"] = np.select( [df.spend > 1000, df.spend > 100], ["gold", "silver"], default="bronze", ) - Downcast dtypes to cut memory:
categoryfor low-cardinality strings,int32/float32where safe.df["country"] = df["country"].astype("category") - Prefer
mergeover loops for joins, and validate join cardinality:df = orders.merge(users, on="user_id", how="left", validate="m:1")
Performance toolkit
df.groupby(..., observed=True).agg(...)—observed=Trueavoids exploding categorical combinations.pd.eval/df.query()for large boolean filters.- Read big files in chunks (
chunksize=) or switch to Polars/DuckDB when pandas is the bottleneck. df.pipe(fn)to compose transformations without intermediate variables.
Method chaining (readable + copy-safe)
result = (
df
.query("status == 'active'")
.assign(revenue=lambda d: d.qty * d.price)
.groupby("region", observed=True)
.agg(total=("revenue", "sum"))
.reset_index()
)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 78 lines · 38 tokens per session scan A e6e3059764f2
pandas-patterns is a skill published in the GitHub repository param087/agent-ml-skills (9 stars, last pushed 3mo ago), licensed MIT. It adds 38 tokens to every session and 721 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
fastapi-templates
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
marimo-pair
Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.
python-guidelines
This skill should be used when writing, reviewing, or refactoring Python code. Covers code integration, idiomatic patterns, docstring formatting, anti-abstraction rules, and software engineering basics.
manimgl-best-practices
Trigger when: (1) User mentions "manimgl" or "ManimGL" or "3b1b manim", (2) Code contains from manimlib import , (3) User runs manimgl CLI commands, (4) Working with InteractiveScene, self.frame, self.embed(), ShowCreation(), or ManimGL-specific patterns. Best practices for ManimGL (Grant Sanderson's 3Blue1Brown…
cnsplots
Create, revise, and troubleshoot publication-ready scientific plots in Python with cnsplots, including distribution, regression, heatmap, genomics, survival, set, flow, and multi-panel figures. Use when a user asks for cnsplots code, Cell/Nature/Science-style visualization, precise pixel-sized figures, statistical…