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
累計下載
2705
星標
1
全站排名
#3,946
全站前 78% · 「資料分析」前 76%
平台累計安裝累計下載星標評論
ClawHub ↗752576--
SkillHub ↗17927051—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

主文覆蓋缺失值、重複項和異常值處理、統計彙總、格式轉換、篩選、聚合與合併等工作。清理和變換可能改變資料;保留原始檔案,將輸出寫入新檔案,並檢查結果後再用於下游。

資料釋出於 2026-10-27

可以用來做什麼

  • 清理和彙總 CSV 或 Excel 資料
  • 篩選、合併或重塑表格
  • 在不同資料格式間轉換

什麼時候用

  • 需要處理 pandas DataFrame 或表格資料時
  • 寫出變更結果前備份原始資料並複核輸出時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

分析這份表格並提出清理方案,保留原始檔案,將結果寫入新檔案供我檢查。

月度資料趨勢

累計下載2705
975190428332026-03 · 累計下載 11032026-05 · 累計下載 17932026-06 · 累計下載 19852026-07 · 累計下載 22382026-08 · 累計下載 24622026-09 · 累計下載 270526-0326-09
星標1
0112026-03 · 星標 -2026-05 · 星標 -2026-06 · 星標 -2026-07 · 星標 -2026-08 · 星標 12026-09 · 星標 126-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-092705—1
2026-082462+10.0%1
2026-072238+12.7%-
2026-061985+10.7%-
2026-051793—-
2026-031103—-

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萬★ 114Peter Steinberger

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。