一键导入
excel-analyzer
Analyze and process Excel/CSV files using pandas and openpyxl. Supports data summary, filtering, pivot tables, and chart generation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze and process Excel/CSV files using pandas and openpyxl. Supports data summary, filtering, pivot tables, and chart generation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Playwright browser automation — navigate, read, and interact with web pages using text snapshots and ref-based targeting. Supports keyboard, dialogs, file upload, JS evaluation, console/network debugging, and PDF export. Login state persists across sessions. Use when user wants to open a URL, fill a web form, scrape page content, or operate any website that requires clicking/typing.
Local web search (Tavily/Exa, requires API Key). For quick searches. If no Key configured or deep research needed, use cloud_agent instead.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks Moltbot to add a note, list notes, search notes, or manage note folders.
Search and manage Apple Photos library on macOS via osascript.
Manage Apple Reminders via the `remindctl` CLI on macOS (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
| name | excel-analyzer |
| description | Analyze and process Excel/CSV files using pandas and openpyxl. Supports data summary, filtering, pivot tables, and chart generation. |
| version | 1.0.0 |
| parameters | [{"name":"file_path","type":"string","required":true,"description":"Excel/CSV 文件路径"},{"name":"task","type":"string","enum":["summary","filter","pivot","chart","custom"],"default":"summary","description":"分析任务类型"}] |
| metadata | {"xiaodazi":{"dependency_level":"lightweight","os":["common"],"backend_type":"local","user_facing":true,"python_packages":["pandas","openpyxl"],"auto_install":true}} |
帮助用户分析和处理 Excel/CSV 文件。
首次使用时自动安装:
pip install pandas openpyxl
通过 Python 脚本使用 pandas 处理 Excel/CSV 文件。
import pandas as pd
# 读取 Excel
df = pd.read_excel("/path/to/file.xlsx", sheet_name=0)
# 读取 CSV
df = pd.read_csv("/path/to/file.csv")
# 查看基本信息
print(f"行数: {len(df)}, 列数: {len(df.columns)}")
print(f"列名: {list(df.columns)}")
print(df.head())
# 基本统计
print(df.describe())
# 按列汇总
print(df.groupby("类别").agg({"金额": ["sum", "mean", "count"]}))
# 条件筛选
filtered = df[df["金额"] > 1000]
# 多条件
filtered = df[(df["部门"] == "销售") & (df["金额"] > 500)]
# 导出到新 Excel
result.to_excel("/path/to/output.xlsx", index=False)
# 导出到 CSV
result.to_csv("/path/to/output.csv", index=False, encoding="utf-8-sig")
分析前和分析后都要做数据校验,确保结果可信:
# 1. 行数校验:打印清洗前后行数,确认只去了空行/噪音行
print(f"清洗前: {len(df_raw)} 行 → 清洗后: {len(df_clean)} 行 (去除 {len(df_raw)-len(df_clean)} 行)")
# 2. 分类列去重:检查分类列(如地区、产品)是否有近似重复值
for col in categorical_columns:
unique_vals = df_clean[col].unique()
print(f"列 '{col}' 唯一值: {unique_vals}")
# 检查近似重复(如 "华东" vs "华东地区")
# 如有近似重复,合并为统一值
# 3. 聚合一致性校验:各分组 sum 必须等于总 sum
total = df_clean["金额"].sum()
group_total = df_clean.groupby("地区")["金额"].sum().sum()
assert abs(total - group_total) < 0.01, f"聚合不一致: 总额 {total} ≠ 分组合计 {group_total}"