Install any skill in seconds. Free to start, no credit card required.
Get Started Free →对多Sheet Excel文件进行基础统计与,支持按条件筛选计算均值,以及从指定行区间提取数据去重求和,并生成结果文件与下载链接。
.claude/skills/opensensenova-excel-basic-statistics-and-routing/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 5 |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 24% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 23% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 128% | 0% |
| case-20 | ✓→✓ | = Same ✓ | 22% | 0% |
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 筛选指定分组数据,将目标列转换为数值类型并计算平均值。
pythongroup_col = '班级' # 占位示例 target_group_value = '358' # 占位示例 target_cols = ['总分', '理数'] # 占位示例 if group_col not in df_analysis.columns: raise ValueError(f"数据中缺少'{group_col}'列。") df_analysis[group_col] = df_analysis[group_col].astype(str) filtered_df = df_analysis[df_analysis[group_col] == target_group_value] avg_scores = {} for col in target_cols: if col not in filtered_df.columns: raise ValueError(f"数据中缺少'{col}'列。") try: filtered_df[col] = pd.to_numeric(filtered_df[col], errors='raise') avg_scores[f'平均{col}'] = filtered_df[col].mean() except Exception as e: raise ValueError(f"列'{col}'无法转换为数值类型: {str(e)}") output("筛选结果统计: " + str(avg_scores))
Step2 对于小文件,从特定 Sheet 的指定行区间提取目标字段,去重后计算总和。
pythonunique_components = {} total_power = 0 if total_rows < 10000: target_sheet = 'Sheet2' # 占位示例 df_sheet2 = pd.read_excel(file_path, sheet_name=target_sheet) extracted_data = [] # 提取区间1 (例如 21-28行) for i in range(21, 29): if i < len(df_sheet2): row = df_sheet2.iloc[i] component = row.iloc[0] power = row.iloc[6] if pd.notna(component) and pd.notna(power): try: extracted_data.append({'Component': component, 'Value': float(power)}) except: pass # 提取区间2 (例如 51-58行) for i in range(51, 59): if i < len(df_sheet2): row = df_sheet2.iloc[i] component = row.iloc[0] power = row.iloc[1] if pd.notna(component) and pd.notna(power): try: extracted_data.append({'Component': component, 'Value': float(power)}) except: pass # 合并并去重 (保留首次出现的值) for item in extracted_data: name = item['Component'] val = item['Value'] if name not in unique_components: unique_components[name] = val total_power = sum(unique_components.values())
Step3 将计算结果、筛选数据和统计信息保存为Excel文件,并生成本地下载链接。
pythonimport os # 保存区间提取与汇总结果 if total_rows < 10000: result_df = pd.DataFrame([ {'Component Name': name, 'Est. Power (kW)': power} for name, power in unique_components.items() ]) total_row = pd.DataFrame([{'Component Name': '合计', 'Est. Power (kW)': total_power}]) result_df = pd.concat([result_df, total_row], ignore_index=True) output_path_power = "output_power_sum.xlsx" result_df.to_excel(output_path_power, index=False) output(f"功率计算结果已保存。下载链接: file://{os.path.abspath(output_path_power)}") # 保存筛选与统计结果 output_path_analysis = "output_analysis_result.xlsx" with pd.ExcelWriter(output_path_analysis, engine='openpyxl') as writer: filtered_df.to_excel(writer, sheet_name="筛选数据", index=False) pd.DataFrame([avg_scores]).to_excel(writer, sheet_name="统计信息", index=False) output(f"分析完成,结果已保存。下载链接: file://{os.path.abspath(output_path_analysis)}")
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 11,202 | 7,811 | -30% | 1 | 1 | 0% | 2,277 | 2,829 | +24% | 0 | 0 | — |
case-02 | fail→pass | 12,088 | 8,389 | -31% | 1 | 1 | 0% | 2,655 | 3,048 | +15% | 0 | 0 | — |
case-03 | fail→pass | 11,181 | 9,080 | -19% | 1 | 1 | 0% | 2,413 | 2,976 | +23% | 0 | 0 | — |
case-04 | fail→fail | 9,140 | 6,032 | -34% | 1 | 1 | 0% | 1,998 | 2,318 | +16% | 0 | 0 | — |
case-05 | fail→fail | 5,435 | 7,240 | +33% | 1 | 1 | 0% | 1,219 | 2,767 | +127% | 0 | 0 | — |
case-06 | fail→fail | 4,851 | 6,597 | +36% | 1 | 1 | 0% | 560 | 2,060 | +268% | 0 | 0 | — |
case-07 | fail→fail | 2,908 | 4,971 | +71% | 1 | 1 | 0% | 448 | 2,125 | +374% | 0 | 0 | — |
case-08 | fail→fail | 5,783 | 6,419 | +11% | 1 | 1 | 0% | 1,021 | 2,314 | +127% | 0 | 0 | — |
case-09 | fail→fail | 3,028 | 4,982 | +65% | 1 | 1 | 0% | 442 | 2,074 | +369% | 0 | 0 | — |
case-10 | fail→fail | 7,327 | 5,545 | -24% | 1 | 1 | 0% | 1,501 | 2,033 | +35% | 0 | 0 | — |
case-11 | fail→fail | 9,378 | 6,370 | -32% | 1 | 1 | 0% | 1,221 | 2,343 | +92% | 0 | 0 | — |
case-12 | fail→fail | 2,317 | 6,795 | +193% | 1 | 1 | 0% | 375 | 2,666 | +611% | 0 | 0 | — |
case-13 | fail→fail | 9,572 | 5,770 | -40% | 1 | 1 | 0% | 1,868 | 1,911 | +2% | 0 | 0 | — |
case-14 | fail→fail | 6,958 | 6,749 | -3% | 1 | 1 | 0% | 1,313 | 2,587 | +97% | 0 | 0 | — |
case-15 | fail→fail | 7,396 | 4,040 | -45% | 1 | 1 | 0% | 1,480 | 1,879 | +27% | 0 | 0 | — |
case-16 | fail→fail | 8,246 | 2,894 | -65% | 1 | 1 | 0% | 1,727 | 1,582 | -8% | 0 | 0 | — |
case-17 | fail→pass | 3,778 | 2,888 | -24% | 1 | 1 | 0% | 747 | 1,704 | +128% | 0 | 0 | — |
case-18 | fail→fail | 8,524 | 7,783 | -9% | 1 | 1 | 0% | 1,369 | 2,964 | +117% | 0 | 0 | — |
case-19 | fail→fail | 6,091 | 3,735 | -39% | 1 | 1 | 0% | 967 | 1,786 | +85% | 0 | 0 | — |
case-20 | pass→pass | 22,461 | 12,605 | -44% | 1 | 1 | 0% | 3,116 | 3,807 | +22% | 0 | 0 | — |
case-21 | pass→pass | 14,021 | 9,892 | -29% | 1 | 1 | 0% | 2,584 | 2,995 | +16% | 0 | 0 | — |
case-22 | pass→pass | 11,292 | 8,692 | -23% | 1 | 1 | 0% | 2,265 | 2,862 | +26% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.