large-file-conditional-formatting
仓库创建 2026年4月14日最近提交 4 天前SkillHot 收录 20 天前
▸ 精选理由
结合 Parquet 提速与 openpyxl 条件格式,适合批量报表生成与对比分析。
这个 Skill 做什么
在大文件模式下计算时间序列均值,并导出带条件格式的 Excel 分析报告。
针对大表/时间序列数据自动切到 Parquet 加速读取,计算指定维度的时间序列均值并导出带条件格式的 Excel 报告(如低于均值标绿)。用在数据量大、需要把分析结果以易读表格分享给业务的时候。特色是兼顾性能和可视化,最终文件用 openpyxl 加样式、便于审阅。
▸ 展开 SKILL.md 英文原文
根据Excel总行数自动切换Parquet加速读取,计算特定维度的时间序列平均值,并使用openpyxl输出带有条件格式(如低于均值标绿)和自定义样式的分析报告。
4.8k
Stars
331
Forks
40
仓库内 Skill
+141
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/OpenSenseNova/SenseNova-Skills/main/skills/sn-da-excel-workflow/capability/excel-cell-coloring/threshold-cell-coloring/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/OpenSenseNova/SenseNova-Skills/main/skills/sn-da-excel-workflow/capability/excel-cell-coloring/threshold-cell-coloring/SKILL.md"SKILL.MD 节选查看完整文件 ↗
## Skill Steps
> **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 读取文件并统计所有 sheet 的行数,汇总后打印总行数,用于判断是否需要大文件加速。
```python
import pandas as pd
import openpyxl
file_path = "input_data.xlsx"
# 获取所有sheet名称
wb = openpyxl.load_workbook(file_path, read_only=True)
sheet_names = wb.sheetnames
print("Sheet列表:", sheet_names)
print("Sheet数量:", len(sheet_names))
# 统计每个sheet的行数
total_rows = 0
for name in sheet_names:
df_temp = pd.read_excel(file_path, sheet_name=name, header=None)
rows = len(df_temp)
total_rows += rows
print(f"Sheet '{namevia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有