dataframe-polars
Skill86 starsChanged 52 days agoMITView on GitHub
Use this when performing DataFrame operations — including loading, filtering, joining, aggregating, transforming, or reshaping tabular data with polars or pandas.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analysis-reportingSkill
- causal-inference-diagnosticsSkill
- notebook-workflowSkill
- path-and-ioSkill
- plan-analysisSkill
- predictive-modeling-diagnosticsSkill
- prepare-prSkill
- python-project-opsSkill
- python-styleSkill
- review-sqlSkill
- run-edaSkill
- run-modelingSkill
- safe-data-handlingSkill
- simulation-optimization-diagnosticsSkill
- sql-analysisSkill
- statistical-inference-diagnosticsSkill
- statistical-ml-reviewSkill
- summarize-analysisSkill
- sync-agent-docsSkill
- unsupervised-eda-diagnosticsSkill
- update-agent-docsSkill
- visualizationSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill for DataFrame operations.
- Distinctive: line 12
Prefer polars for all DataFrame work.
- Distinctive: line 13
Prefer LazyFrame for loading, filtering, joins, aggregations, and transformations.
- Distinctive: line 14
Use eager execution when simpler and data is small.
- Distinctive: line 18
Use pandas only when required by an existing dependency, external library, or legacy code.
- Distinctive: line 19
If pandas is needed, keep its usage minimal and convert back to polars as soon as practical.
- Distinctive: line 24
Avoid manual, spreadsheet-like edits.
- Distinctive: line 25
Document data transformations with comments (in Japanese).
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Skill: DataFrame Operations with Polars
Use this skill for DataFrame operations.
Default: Polars
- Prefer polars for all DataFrame work.
- Prefer LazyFrame for loading, filtering, joins, aggregations, and transformations.
- Use eager execution when simpler and data is small.
Pandas: Only When Required
- Use pandas only when required by an existing dependency, external library, or legacy code.
- If pandas is needed, keep its usage minimal and convert back to polars as soon as practical.
Transformations
- Transformations should be reproducible and scriptable.
- Avoid manual, spreadsheet-like edits.
- Document data transformations with comments (in Japanese).
Examples
Lazy Scan and Filter
import polars as pl
# Parquetファイルを遅延読み込み
lf = pl.scan_parquet("data/raw/events.parquet")
# 日付フィルタと列選択
result = (
lf.filter(pl.col("event_date") >= "2024-01-01")
.select(["user_id", "event_type", "event_date"])
.collect()
)Group By and Aggregation
# ユーザーごとのイベント数を集計
summary = (
lf.group_by("user_id")
.agg(
pl.col("event_type").count().alias("event_count"),
pl.col("event_date").max().alias("last_event"),
)
.collect()
)Safe Join with Row Count Check
left = pl.scan_parquet("data/processed/users.parquet")
right = pl.scan_parquet("data/processed/orders.parquet")
# 結合前の行数を確認
left_count = left.select(pl.len()).collect().item()
right_count = right.select(pl.len()).collect().item()
joined = left.join(right, on="user_id", how="left").collect()
# 結合後の行数を確認(ファンアウトの検出)
assert joined.height >= left_count, "LEFT JOINで行が減少:joinキーを確認"
print(f"left={left_count}, right={right_count}, joined={joined.height}")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.

