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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.5 | $0.00015 | $0.00288 |
| Sonnet 5.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 2mo 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.
- 2mo 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 (13 stars, last pushed 5mo ago), licensed MIT. It adds 38 tokens to every session and 721 once invoked, about $0.0002 per session on Opus 5.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.
pandas-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pandas-patternsparam087/agent-ml-skills | Skill | 13 | 5mo ago | MIT | A | 38 | Claude Code, Codex |
| temporal-python-testingwshobson/agents | Skill | 42k | yesterday | MIT | A | 45 | Claude Code |
| marimo-pairmarimo-team/marimo | Skill | 23k | yesterday | Apache-2.0 | A | 57 | Claude Code, Codex |
| manimgl-best-practicescalesthio/OpenMontage | Skill | 77k | 3d ago | AGPL-3.0 | A | 167 | Claude Code, Codex |
| python-guidelinesfcakyon/claude-codex-settings | Skill | 1.2k | yesterday | Apache-2.0 | A | 42 | Claude Code |
| prismer-python-debugpyPrismer-AI/PrismerCloud | Skill | 1.4k | 15d ago | MIT | A | 19 | Claude Code, Codex |
| cnsplotsfaridrashidi/cnsplots | Skill | 724 | 5d ago | BSD-3-Clause | A | 79 | Codex |