← Back to list

pandas-best-practices
by mdbabumiamssm
⭐ 9🍴 2📅 Jan 23, 2026
SKILL.md
name: pandas-best-practices description: Standards for efficient, readable, and performant data manipulation using Python's Pandas library. license: MIT metadata: author: AI Group version: "1.0.0" category: Software_Engineering compatibility:
- system: Python 3.9+
- system: Pandas 2.0+ allowed-tools:
- read_file
- replace
- write_file
Pandas Best Practices
This skill provides guidelines for working with tabular data in Python. It focuses on vectorization, memory management, and method chaining to write "Modern Pandas" code.
When to Use This Skill
- Data Cleaning: Preprocessing clinical or genomic datasets.
- Analysis: Performing aggregations, merges, or statistical summaries.
- Performance: Optimizing slow-running scripts that process large CSVs/DataFrames.
Core Capabilities
- Vectorization: Replacing
forloops with vectorized array operations. - Method Chaining: Writing readable, fluent data transformation pipelines.
- Memory Optimization: Using appropriate dtypes (Categoricals, Nullable Ints) to reduce RAM usage.
- Modern Indexing: Using
.locand.iloccorrectly; avoidingSettingWithCopyWarning.
Workflow
- Inspect Data: Check
df.info()anddf.head(). - Define Pipeline: Plan transformations (filter -> group -> aggregate).
- Implement Chain: Write the logic as a chain of methods.
- Optimize: Check for loops or
applycalls that can be vectorized.
Example Usage
User: "Calculate the mean age by patient group, but exclude patients with missing IDs."
Agent Action:
- Reads
references/rules.md. - Generates:
result = ( df .dropna(subset=['patient_id']) .groupby('patient_group')['age'] .mean() .reset_index() )
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon