large-file-conditional-formatting
根据Excel总行数自动切换Parquet加速读取,计算特定维度的时间序列平均值,并使用openpyxl输出带有条件格式(如低于均值标绿)和自定义样式的分析报告。
npx skills add OpenSenseNova/SenseNova-Skills --skill threshold-cell-coloring --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## 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 '{name}': {rows} 行") print(f"\n总行数 = {total_rows}") ``` Step2 提取目标实体的时间序列数据,计算平均值,并构建包含比较结果的结构化 DataFrame。 ```python target_entity = 'Target_Entity' # 占位示例,如 'US' # 提取目标行数据 (假设第0列为实体名称) target_row = df[df[0] == target_entity] # 提取时间标签和对应数值 (假设第6行为表头,1:10列为数据) time_labels = df.iloc[6, 1:10].tolist() target_values = target_row.iloc[0, 1:10].tolist() target_values_numeric = [float(v) for v in target_values] # 计算平均值 avg_value = sum(target_values_numeric) / len(target_values_numeric) # 构建结果 DataFrame result_data = { '时间维度': tim
- Skill Steps
What does the large-file-conditional-formatting skill do?
根据Excel总行数自动切换Parquet加速读取,计算特定维度的时间序列平均值,并使用openpyxl输出带有条件格式(如低于均值标绿)和自定义样式的分析报告。
How do I install it?
Run `npx skills add OpenSenseNova/SenseNova-Skills --skill threshold-cell-coloring --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From OpenSenseNova/SenseNova-Skills, a repository with 4,855 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
