/multi-file-reading
读取多 Sheet Excel 文件并统计规模,支持大文件向 Parquet 格式转换、分类数据统计及可视化报告生成。
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill multi-file-reading --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/multi-file-reading
Context preview
The summary Claude sees to decide when to auto-load this skill.
读取多 Sheet Excel 文件并统计规模,支持大文件向 Parquet 格式转换、分类数据统计及可视化报告生成。
SKILL.md
multi-file-reading.SKILL.mdname: multi-file-excel-parquet-analysis
description: "读取多 Sheet Excel 文件并统计规模,支持大文件向 Parquet 格式转换、分类数据统计及可视化报告生成。"
> **Note**: This sub-skill covers one step of the Excel analysis workflow. For the full pipeline (file reading, row counting, large-file optimization, export), see the parent workflow SKILL.md.
Step1 读取 Excel 文件,遍历所有 Sheet 统计行数,评估数据规模。
import pandas as pd
import os
file_path = "input_data.xlsx" # 替换为实际文件路径
if not os.path.exists(file_path):
print(f"Error: 文件 {file_path} 不存在")
else:
# 获取所有 sheet 名称
xl = pd.ExcelFile(file_path)
sheet_names = xl.sheet_names
print("Sheet 列表:", sheet_names)
total_rows = 0
for sheet in sheet_names:
# 仅读取第一列以快速统计行数,避免大文件内存溢出
df_tmp = pd.read_excel(file_path, sheet_name=sheet, usecols=[0])
row_count = len(df_tmp)
total_rows += row_count
print(f"Sheet: {sheet}, 行数: {row_count}")
print(f"总行数汇总: {total_rows}")Step2 读取转换后的数据,执行分类统计分析,计算频数与占比。
import pandas as pd
# 读取 Parquet 文件
df_analyzed = pd.read_parquet(output_parquet)
# 定义目标统计列(如 '剪裁结果'、'状态' 等)
target_col = '剪裁结果'
if target_col in df_analyzed.columns:
# 统计各分类数量及占比
counts = df_analyzed[target_col].value_counts()
percent = df_analyzed[target_col].value_counts(normalize=True) * 100
# 构建统计表格并添加总计行
summary_df = pd.DataFrame({
'分类': counts.index,
'数量': counts.values,
'占比(%)': percent.values.round(2)
})
# 添加总计行
total_row = pd.DataFrame([['总计', summary_df['数量'].sum(), 100.0]], columns=summary_df.columns)
summary_df = pd.concat([summary_df, total_row], ignore_index=True)
print("统计摘要:\n", summary_df)
else:
print(f"未找到目标列: {target_col}")Step3 生成可视化饼图并保存分析报告,提供结果下载链接。
import matplotlib.pyplot as plt
# 配置中文字体(实战技巧:防止图表乱码)
plt.rcParams['font.sans-serif'] = ['SimHei', 'DejaVu Sans']
plt.rcParams['axes.unicode_minus'] = False
if target_col in df_analyzed.columns:
# 绘制饼图
plt.figure(figsize=(10, 7), dpi=100)
plot_data = df_analyzed[target_col].value_counts()
plt.pie(plot_data, labels=plot_data.index, autopct='%1.1f%%', startangle=90, colors=plt.cm.Paired.colors)
plt.title(f'{target_col} 分布占比')
# 保存图表
chart_output = "analysis_pie_chart.png"
plt.savefig(chart_output, bbox_inches='tight')
# 保存统计结果为 Excel
report_output = "analysis_report.xlsx"
summary_df.to_excel(report_output, index=False)
print(f"分析图表已保存: {chart_output}")
print(f"统计表格已保存: {report_output}")
# 生成下载链接(用于报告展示)
print(f"下载链接: {os.path.abspath(report_output)}")Read more
name: multi-file-excel-parquet-analysis description: "读取多 Sheet Excel 文件并统计规模,支持大文件向 Parquet 格式转换、分类数据统计及可视化报告生成。"
> **Note**: This sub-skill covers one step of the Excel analysis workflow. For the full pipeline (file reading, row counting, large-file optimization, export), see the parent workflow SKILL.md.
Step1 读取 Excel 文件,遍历所有 Sheet 统计行数,评估数据规模。
import pandas as pd
import os
file_path = "input_data.xlsx" # 替换为实际文件路径
if not os.path.exists(file_path):
print(f"Error: 文件 {file_path} 不存在")
else:
# 获取所有 sheet 名称
xl = pd.ExcelFile(file_path)
sheet_names = xl.sheet_names
print("Sheet 列表:", sheet_names)
total_rows = 0
for sheet in sheet_names:
# 仅读取第一列以快速统计行数,避免大文件内存溢出
df_tmp = pd.read_excel(file_path, sheet_name=sheet, usecols=[0])
row_count = len(df_tmp)
total_rows += row_count
print(f"Sheet: {sheet}, 行数: {row_count}")
print(f"总行数汇总: {total_rows}")Step2 读取转换后的数据,执行分类统计分析,计算频数与占比。
import pandas as pd
# 读取 Parquet 文件
df_analyzed = pd.read_parquet(output_parquet)
# 定义目标统计列(如 '剪裁结果'、'状态' 等)
target_col = '剪裁结果'
if target_col in df_analyzed.columns:
# 统计各分类数量及占比
counts = df_analyzed[target_col].value_counts()
percent = df_analyzed[target_col].value_counts(normalize=True) * 100
# 构建统计表格并添加总计行
summary_df = pd.DataFrame({
'分类': counts.index,
'数量': counts.values,
'占比(%)': percent.values.round(2)
})
# 添加总计行
total_row = pd.DataFrame([['总计', summary_df['数量'].sum(), 100.0]], columns=summary_df.columns)
summary_df = pd.concat([summary_df, total_row], ignore_index=True)
print("统计摘要:\n", summary_df)
else:
print(f"未找到目标列: {target_col}")Step3 生成可视化饼图并保存分析报告,提供结果下载链接。
import matplotlib.pyplot as plt
# 配置中文字体(实战技巧:防止图表乱码)
plt.rcParams['font.sans-serif'] = ['SimHei', 'DejaVu Sans']
plt.rcParams['axes.unicode_minus'] = False
if target_col in df_analyzed.columns:
# 绘制饼图
plt.figure(figsize=(10, 7), dpi=100)
plot_data = df_analyzed[target_col].value_counts()
plt.pie(plot_data, labels=plot_data.index, autopct='%1.1f%%', startangle=90, colors=plt.cm.Paired.colors)
plt.title(f'{target_col} 分布占比')
# 保存图表
chart_output = "analysis_pie_chart.png"
plt.savefig(chart_output, bbox_inches='tight')
# 保存统计结果为 Excel
report_output = "analysis_report.xlsx"
summary_df.to_excel(report_output, index=False)
print(f"分析图表已保存: {chart_output}")
print(f"统计表格已保存: {report_output}")
# 生成下载链接(用于报告展示)
print(f"下载链接: {os.path.abspath(report_output)}")The SenseNova model family plugs directly into agent runtimes such as OpenClaw and hermes-agent, with the skills in this repository extending the models with concrete, end-to-end office capabilities.
Repo: OpenSenseNova/SenseNova-Skills
Other skills on sensenova-skills.
- /sn-da-excel-workflow
Excel 数据分析多步编排器。覆盖:(1) 读取多 Sheet Excel 文件并统计行数,(2) 大文件检测(≥10k 行自动 Parquet 优化),(3) 数据清洗(缺失值、文本标准化、无效字符),(4) 条件筛选与分类提取,(5) 跨 Sheet 统计聚合,(6) 导出 Excel/CSV 并提供下载链接。覆盖从数据读取到报告生成全流程,按步骤编排 capability 子 skill。**遇到以下任一情况就主动使用本 skill,不要自行写几行 pandas 就回答**:①用户出现触发词:Excel 分析 / 表格分析 / 数据分析 /
Open skill - /category-coloring
当Excel文件总行数超过1万行时,通过转换为Parquet格式提升读取性能,提取目标指标并计算最大值,最后将结果输出为Excel并对特定行进行高亮标注。
Open skill - /duplicate-value-coloring
对比Excel多表中的特定系数并对异常值进行颜色标记。
Open skill - /outlier-coloring
识别 Excel 中的超限数值与错误单元格并进行高亮标注。
Open skill - /threshold-cell-coloring
根据Excel总行数自动切换Parquet加速读取,计算特定维度的时间序列平均值,并使用openpyxl输出带有条件格式(如低于均值标绿)和自定义样式的分析报告。
Open skill - /top-value-coloring
根据数据规模动态选择处理策略,对多表数据进行合并、统计筛选,并利用 openpyxl 实现关键指标的自动化样式高亮与格式化导出。
Open skill

