Ryan

Pandas Skill

数据分析v1.0.0
作者:Ryan更新于 2026-05-11pandas-skill@clawhub_yangruihan/pandas-skill
数据清洗数据可视化报表生成#CSV#Data Analysis#Data Processing#Documentation

据 AlphaMoat 统计,截至 2026-09,Pandas Skill 累计下载 2,705 次、获 1 个星标,在全部 5,078 个 AI 技能中排名第 3,946 位,在「数据分析」分类(399 个)中排名第 300 位。

累计安装
179
累计下载
2,705
星标
1
全站排名
#3,946
全站前 78% · 「数据分析」前 76%
平台累计安装累计下载星标评论
ClawHub ↗752,576--
SkillHub ↗1792,7051—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

主文覆盖缺失值、重复项和异常值处理、统计汇总、格式转换、筛选、聚合与合并等工作。清理和变换可能改变数据;保留原始文件,将输出写入新文件,并检查结果后再用于下游。

资料发布于 2026-10-27

可以用来做什么

  • 清理和汇总 CSV 或 Excel 数据
  • 筛选、合并或重塑表格
  • 在不同数据格式间转换

什么时候用

  • 需要处理 pandas DataFrame 或表格数据时
  • 写出变更结果前备份原始数据并复核输出时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

分析这份表格并提出清理方案,保留原始文件,将结果写入新文件供我检查。

月度数据趋势

累计下载2,705
9751,9042,8332026-03 · 累计下载 1,1032026-05 · 累计下载 1,7932026-06 · 累计下载 1,9852026-07 · 累计下载 2,2382026-08 · 累计下载 2,4622026-09 · 累计下载 2,70526-0326-09
星标1
0112026-03 · 星标 -2026-05 · 星标 -2026-06 · 星标 -2026-07 · 星标 -2026-08 · 星标 12026-09 · 星标 126-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-092,705—1
2026-082,462+10.0%1
2026-072,238+12.7%-
2026-061,985+10.7%-
2026-051,793—-
2026-031,103—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

8.4 KB · ClawHub v1.0.0
---
name: pandas-skill
description: Expert pandas skill for data manipulation, cleaning, analysis, and transformation. Use this skill when working with tabular data, CSV/Excel files, data analysis tasks, or any data processing workflow that involves pandas DataFrames. Provides executable scripts for common operations and comprehensive reference documentation.
---

# Pandas Data Processing Skill

English | [简体中文](SKILL_CN.md)

This skill provides comprehensive pandas data processing capabilities through executable scripts and reference documentation. Use this skill whenever tasks involve data manipulation, cleaning, analysis, or transformation of tabular data.
展开全部(共 261 行)
## When to Use This Skill

Activate this skill when the user requests:

- Data cleaning operations (handling missing values, duplicates, outliers)
- Data analysis and statistical summaries
- Format conversions (CSV ↔ Excel ↔ JSON ↔ Parquet)
- Data transformation (filtering, sorting, aggregation, pivoting)
- Merging or combining multiple datasets
- Generating data quality reports
- Any pandas DataFrame operations

## Core Capabilities

### 1. Data Cleaning (`scripts/data_cleaner.py`)

Handles common data cleaning tasks with a single command:

**Usage:**
```bash
python scripts/data_cleaner.py input.csv output.csv [options]
```

**Available Options:**
- `--remove-duplicates`: Remove duplicate rows
- `--handle-missing [strategy]`: Handle missing values
  - Strategies: `drop`, `fill`, `forward`, `backward`, `mean`, `median`
- `--fill-value [value]`: Custom fill value for missing data
- `--remove-outliers`: Remove outliers using IQR or Z-score method
- `--outlier-method [method]`: Choose `iqr` or `zscore` (default: iqr)
- `--standardize-columns`: Standardize column names (lowercase, underscores)

**Example:**
```bash
python scripts/data_cleaner.py data.csv cleaned_data.csv \
    --remove-duplicates \
    --handle-missing mean \
    --remove-outliers \
    --standardize-columns
```

### 2. Data Analysis (`scripts/data_analyzer.py`)

Generates comprehensive data analysis reports:

**Usage:**
```bash
python scripts/data_analyzer.py input.csv [options]
```

**Available Options:**
- `--output, -o [file]`: Save report to file
- `--format [format]`: Output format (`json` or `text`, default: json)

**Report Includes:**
- Basic information (rows, columns, memory usage)
- Data type distribution
- Missing values analysis
- Numeric column statistics (mean, std, min, max, quartiles, skewness, kurtosis)
- Categorical column statistics (unique values, value counts)
- Correlation analysis
- Outlier detection

**Example:**
```bash
python scripts/data_analyzer.py sales_data.csv -o report.json --format json
```

### 3. Data Transformation (`scripts/data_transformer.py`)

Performs various data transformation operations through subcommands:

#### Convert Format
```bash
python scripts/data_transformer.py convert input.csv output.xlsx
```
Supports: CSV, Excel (.xlsx/.xls), JSON, Parquet, HTML

#### Merge Files
```bash
python scripts/data_transformer.py merge file1.csv file2.csv file3.csv \
    --output merged.csv \
    --how outer \
    --on key_column
```

#### Filter Data
```bash
python scripts/data_transformer.py filter data.csv \
    --query "age > 18 and city == 'Beijing'" \
    --output filtered.csv
```

#### Sort Data
```bash
python scripts/data_transformer.py sort data.csv \
    --by sales quantity \
    --descending \
    --output sorted.csv
```

#### Select Columns
```bash
python scripts/data_transformer.py select data.csv \
    --columns name age city \
    --output selected.csv
```

## Reference Documentation

The `references/` directory contains detailed documentation:

### `references/common_operations.md`

Comprehensive reference covering:
- Data reading/saving (CSV, Excel, JSON, SQL, Parquet)
- Data exploration (head, info, describe, dtypes)
- Data selection and filtering (loc, iloc, boolean indexing, query)
- Data cleaning (handling missing/duplicate values, type conversion)
- Data transformation (apply, map, sorting, column operations)
- Groupby and aggregation operations
- Pivot tables
- Merging and joining (concat, merge, join)
- Time series operations
- String operations
- Performance optimization tips

**When to use:** When Claude needs to understand pandas syntax or find the right method for a specific operation.

### `references/data_cleaning_best_practices.md`

Best practices guide covering:
- Data quality check checklist
- Missing value handling strategies with decision tree
- Outlier detection methods (IQR, Z-Score, percentile)
- Data type optimization for memory efficiency
- String cleaning techniques
- Date/time standardization
- Complete cleaning pipeline template
- Common problems and solutions
- Data validation methods

**When to use:** When designing a data cleaning workflow or deciding on the best approach for specific data quality issues.

## Workflow Guidelines

### Step 1: Initial Assessment
Always start by analyzing the data:
```bash
python scripts/data_analyzer.py input_file.csv -o analysis_report.json
```
Review the report to understand data quality, types, missing values, and potential issues.

### Step 2: Plan Cleaning Strategy
Based on the analysis report:
- Identify missing value strategy (reference: `data_cleaning_best_practices.md`)
- Determine if duplicates should be removed
- Decide on outlier handling approach
- Plan any necessary type conversions

### Step 3: Execute Cleaning
Run the data cleaner with appropriate options:
```bash
python scripts/data_cleaner.py input.csv cleaned.csv [options]
```

### Step 4: Transform as Needed
Apply any transformations (filtering, sorting, format conversion, merging):
```bash
python scripts/data_transformer.py [subcommand] [options]
```

### Step 5: Validate Results
Re-run analysis on the cleaned data to verify improvements:
```bash
python scripts/data_analyzer.py cleaned.csv -o final_report.json
```

## Common Patterns

### Pattern 1: Quick Data Quality Report
```bash
python scripts/data_analyzer.py data.csv --format text
```

### Pattern 2: Standard Cleaning Pipeline
```bash
python scripts/data_cleaner.py raw_data.csv clean_data.csv \
    --standardize-columns \
    --remove-duplicates \
    --handle-missing median \
    --remove-outliers
```

### Pattern 3: Excel to CSV with Filtering
```bash
# Convert
python scripts/data_transformer.py convert data.xlsx data.csv

# Filter
python scripts/data_transformer.py filter data.csv \
    --query "status == 'active'" \
    --output filtered.csv
```

### Pattern 4: Merge Multiple CSVs
```bash
python scripts/data_transformer.py merge *.csv \
    --output combined.csv
```

## Dependencies

Ensure pandas is installed:
```bash
pip install pandas numpy openpyxl
```

Optional for specific formats:
```bash
pip install pyarrow  # For Parquet support
pip install xlrd     # For older Excel files (.xls)
```

## Tips for Effective Use

1. **Start with analysis:** Always run the analyzer first to understand the data
2. **Incremental cleaning:** Apply cleaning operations step by step, verify each step
3. **Preserve originals:** Never overwrite original data files
4. **Check references:** Consult reference docs for complex operations or best practices
5. **Validate results:** Use the analyzer to verify cleaning effectiveness
6. **Memory efficiency:** For large files, consider using the data type optimization techniques in the reference docs
7. **Combine operations:** Chain multiple transformer commands for complex workflows

## Limitations

- Scripts work with single-machine memory constraints (for very large datasets, consider Dask)
- Time series resampling and rolling operations require custom pandas code
- Complex statistical modeling beyond basic descriptive statistics requires additional libraries
- For advanced visualizations, use matplotlib/seaborn directly

## Troubleshooting

**Import errors:** Ensure pandas and dependencies are installed
**Memory errors:** Process data in chunks or optimize dtypes (see references)
**Encoding issues:** Add `encoding='utf-8'` parameter when loading CSVs
**Date parsing issues:** Use `pd.to_datetime()` with explicit format string

For detailed pandas operations and troubleshooting, always refer to `references/common_operations.md` and `references/data_cleaning_best_practices.md`.

「数据分析」分类下的热门技能

AdMapix数据分析

AdMapix 的取数层:把广告与应用相关的查询转成接口调用,只回原始 JSON。

↓ 36.6万★ 304fly0pants
Tavily Search数据分析

走 Tavily 检索公开网页,返回带链接与摘要的结构化结果。

↓ 12.2万★ 286Xiaoran Li
Data Analysis数据分析

把数据库、表格与导出的原始数据变成可决策结论的数据分析技能。

↓ 10.1万★ 244Iván
Stock Analysis数据分析

用 Yahoo Finance 数据做股票与加密货币分析、组合跟踪的技能。

↓ 7.5万★ 299udiedrichsen
Stock Watcher数据分析

管理本地自选股清单,并按代码汇总同花顺行情与近期表现的技能。

↓ 6.5万★ 122Robin797860
全国招标中标查询及分析【知了标讯】数据分析

全网招中标数据查询与分析助手。当用户涉及以下任何场景时,必须使用此SKILL:查询招标/中标公告、搜索标讯、查找临期/即将到期项目、商机预测、推荐潜在投标供应商、分析公司主营业务/历史中标、查询公司上下游合作客户与供应商、分析竞争对手/竞对企业、查询Top采购单位/Top中标单位/Top中标品牌、招中标数据统计分析(按月/季/年/省份/品牌等维度)、查询品牌型号历史中标单价/价格趋势、市场分析/行业分析/采购寻源/渠道拓展等采购与投标相关场景。即使用户没有提到「知了标讯」,只要涉及招投标、采购、中标、供应商、竞争对手等关键词,都应使用本SKILL。

↓ 5.6万★ 13user_98035bfb
Blogwatcher数据分析

用命令行监控博客与 RSS/Atom 源的更新。

↓ 5.4万★ 75Peter Steinberger
Model Usage数据分析

汇总 Codex 或 Claude 按模型计费的使用成本。

↓ 5.0万★ 114Peter Steinberger

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。