Skip to content
Agentmart
Submit a tool

data-analysis

数据分析与可视化 (Use when: 需要处理 CSV/Excel 数据、生成图表、统计分析).

Skill by zzycxz

IndexedMIT★ 9
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/zzycxz-data-analysis

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

数据分析与可视化 (Use when: 需要处理 CSV/Excel 数据、生成图表、统计分析). NOT for: 非数据文件、GUI 操作.

Use cases: spreadsheets, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/data-analysis

What's inside

Skill name
data-analysis
Description
数据分析与可视化 (Use when: 需要处理 CSV/Excel 数据、生成图表、统计分析). NOT for: 非数据文件、GUI 操作.
License
MIT
Instructions
88 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • body: contains an absolute path from the author's machine

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Data Analysis — 数据分析与可视化

通过 `python_interpreter` 工具,使用 pandas/matplotlib 完成数据处理和图表生成。

## 常用场景

- 读取 CSV/Excel 并统计汇总
- 数据清洗与缺失值处理
- 生成折线图、柱状图、散点图
- 透视表与分组聚合
- 数据导出为新 Excel/CSV

## 读取与基础分析

```python
import pandas as pd

# 读取文件
df = pd.read_csv(r"C:\path\to\data.csv", encoding="utf-8")
# 或 Excel: df = pd.read_excel(r"C:\path\to\data.xlsx", sheet_name="Sheet1")

print(f"数据形状: {df.shape}")
print(df.head())
print(df.describe())
print(df.isnull().sum())
```

## 数据清洗

```python
# 删除重复行
df = df.drop_duplicates()

# 填充缺失值
df["column"].fillna(df["column"].mean(), inplace=True)

# 类型转换
df["date"] = pd.to_datetime(df["date"])
df["amount"] = pd.to_numeric(df["amount"], errors="coerce")
```

## 生成图表

```python
import matplotlib
matplotlib.use("Agg")  # 非交互模式,必须在 import pyplot 之前
import matplotlib.pyplot as plt

fig, ax = plt.subplots(figsize=(10, 6))
df.groupby("category")["amount"].sum().plot(kind="bar", ax=ax)
ax.set_title("各类别销售额汇总")
ax.set_xlabel("类别")
ax.set_ylabel("金额")
plt.tight_layout()

output_path = r"C:\Users\user\Desktop\chart.png"
plt.savefig(output_path, dpi=150, bbox_inches="tight")
print(f"[RESULT_PATH: {output_path}]")  # 供 Rooster 识别产出文件
plt.close()
```

## 透视表与分组

```python
# 透视表
pivot = df.pivot_table(
    values="amount",
    index="region",
    columns="product",
    aggfunc="sum",
    fill_value=0
)
print(pivot)

# 导出结果
output_excel = r"C:\Users\user\Desktop\pivot_result.xlsx"
pivot.to_excel(output_excel)
print(f"[RESULT_PATH: {output_excel}]")
```

## 注意事项

1. 始终使用 `matplotlib.use("Agg")` 避免无界面环境报错
2. 文件路径使用原始字符串 `r"..."` 或正斜杠
3. 中文显示需设置字体:`plt.rcParams["font.sans-serif"] = ["SimHei"]`
4. 大文件(>10 万行)使用 `chunksize` 分块读取

From zzycxz/rooster, MIT.

More from zzycxz/rooster

Signals

Stars
9
Forks
0
Open issues
0
Last commit (this folder)
Jun 9, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from zzycxz

Cite this page

data-analysis skill. Agent Mart. https://agentmart.dev/skills/zzycxz-data-analysis (last updated 2026-10-24)