pandas
Skill28 starsChanged 5 months agoMITView on GitHub
Use when analyzing or transforming tabular data in Python. Covers vectorized operations, memory-efficient dtypes, correct joins, groupby patterns, and avoiding the silent errors pandas makes easy.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- ZeroTokenClaw/agents-skillstheir own version, first seen Sep 21, 2026
- kandada/aacodetheir own version, first seen Jul 22, 2026
- indiosmo/skillstheir own version, first seen Jun 5, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- kandada/aacode★ 134same name
- ZeroTokenClaw/agents-skills★ 1same name
- indiosmo/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository137 other files it gives its agents.
- agent-instructionsSkill
- agent-memorySkill
- hooksSkill
- plugin-developmentSkill
- skill-authoringSkill
- skill-reviewSkill
- slash-commandsSkill
- subagentsSkill
- agent-designSkill
- context-engineeringSkill
- fine-tuningSkill
- llm-cost-optimizationSkill
- llm-evaluationSkill
- llm-integrationSkill
- mcp-serverSkill
- ml-pipelineSkill
- model-selectionSkill
- prompt-engineeringSkill
- ragSkill
- structured-outputSkill
- api-designSkill
- background-jobsSkill
- cachingSkill
- djangoSkill
- event-driven-architectureSkill
- fastapiSkill
- graphqlSkill
- microservicesSkill
- nestjsSkill
- realtime-websocketsSkill
- spring-bootSkill
- competitive-analysisSkill
- lead-researchSkill
- product-analysisSkill
- resumeSkill
- user-researchSkill
- database-performanceSkill
- data-modelingSkill
- data-qualitySkill
- postgresSkill
- sparkSkill
- brand-guidelinesSkill
- generative-artSkill
- themingSkill
- ui-reviewSkill
- visual-designSkill
- architecture-decisionsSkill
- bug-fix-protocolSkill
- cli-developmentSkill
- code-reviewSkill
- debuggingSkill
- design-patternsSkill
- domain-modelingSkill
- git-workflowSkill
- legacy-modernizationSkill
- refactoringSkill
- repository-explorationSkill
- simple-designSkill
- system-designSkill
- aws-cdkSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 58
Read only the columns you need with usecols.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pandas
Purpose
Transform and analyze tabular data correctly and at speed. Pandas makes it easy to write code that is slow, and easier still to write code that is silently wrong.
When to Use
- Cleaning, transforming, or analyzing tabular data in Python.
- A pandas operation that is slow or exhausting memory.
- Reviewing analysis code for correctness.
- Deciding whether the dataset has outgrown pandas.
Capabilities
- Vectorized operations and eliminating row-wise loops.
- Memory reduction through dtype selection.
- Merge and join semantics, including the ones that silently duplicate rows.
- Groupby, aggregation, and window functions.
- Chunked processing and the migration path to Polars or DuckDB.
Inputs
- The data source, its size, and its schema.
- The transformation or analysis required.
- The memory available.
Outputs
- Vectorized transformations with no
iterrows. - Explicit dtypes, including categoricals for low-cardinality strings.
- Joins with verified cardinality.
Workflow
- Set dtypes at read time — Reading a CSV without
dtypegives youobjectcolumns andfloat64for everything numeric. This is usually a 5-10x memory difference. - Vectorize — Any
forloop oriterrowsover a DataFrame should be a vectorized expression, agroupby, or amerge.applyis a loop with better syntax. - Verify every join —
merge(..., validate="one_to_many"). An unvalidated join that is secretly many-to-many silently multiplies your rows, and the resulting totals will be wrong in a way that is hard to notice. - Aggregate with groupby, not with loops — And use named aggregation so the output columns are readable.
- Chunk or switch when it does not fit — Pandas holds everything in memory, typically at several times the file size. Above a few gigabytes, use chunked processing, Polars, or DuckDB.
Best Practices
df.iterrows()is roughly a hundred times slower than the vectorized equivalent and should essentially never appear in production code.- Chained assignment (
df[df.a > 1]["b"] = 0) may modify a copy and silently do nothing. Use.loc[]. In pandas 3.0 copy-on-write makes this an error rather than a silent no-op — which is an improvement. - A
mergewithoutvalidate=is a bet that the join keys are unique. When that bet is wrong, you get more rows than you started with and no warning. categorydtype for a string column with few distinct values can reduce memory by 90% and speeds up groupby substantially.inplace=Truedoes not save memory (it usually still copies) and prevents method chaining. It has no advantages.- Read only the columns you need with
usecols. The cheapest optimization is not loading the data.
Examples
Reading efficiently, and joining safely:
import pandas as pd
orders = pd.read_csv(
"orders.csv",
usecols=["order_id", "customer_id", "status", "total_cents", "created_at"],
dtype={
"order_id": "string",
"customer_id": "string",
"status": "category", # 4 distinct values: 90% less memory than object
"total_cents": "int64",
},
parse_dates=["created_at"],
)
customers = pd.read_csv("customers.csv", usecols=["customer_id", "segment"],
dtype={"customer_id": "string", "segment": "category"})
# validate= turns a silent row explosion into a loud, immediate error.
enriched = orders.merge(
customers,
on="customer_id",
how="left",
validate="many_to_one", # many orders, one customer. Anything else raises.
)Vectorized instead of looped — and correct:
# Slow (~100x) and easy to get wrong.
for idx, row in df.iterrows():
df.at[idx, "band"] = "high" if row["total_cents"] > 10_000 else "low"
# Vectorized, readable, and it does not mutate while iterating.
df["band"] = pd.cut(
df["total_cents"],
bins=[0, 10_000, 50_000, float("inf")],
labels=["low", "mid", "high"],
)
# Named aggregation: the output columns are named, not a MultiIndex to unpick.
summary = (
df.groupby(["segment", "band"], observed=True)
.agg(
order_count=("order_id", "count"),
revenue_cents=("total_cents", "sum"),
median_cents=("total_cents", "median"),
)
.reset_index()
)Notes
observed=Trueon a groupby with categorical keys is important: without it, pandas produces a row for every possible category combination, including the ones with no data. On two categoricals with many levels this can generate an enormous, mostly empty frame.- Polars is typically 5-30x faster than pandas on the same operations, uses less memory, and has a stricter API that catches errors pandas silently permits. For new analysis code on non-trivial data, it is the better default.
- DuckDB queries Parquet and CSV files directly with SQL, without loading them into memory. For "I need one aggregate from a 20 GB file", it is far simpler than any pandas approach.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

