Install any skill in seconds. Free to start, no credit card required.
Get Started Free →读取多 sheet Excel 文件,动态识别目标列进行统计,并使用正则清洗文本字段提取中文字符,最终输出标准化 Excel 文件。
.claude/skills/opensensenova-excel-large-file-processing-and-cleaning/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 17% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -21% | 0% |
| case-16 | ✗→✓ | ▲ Improved | -37% | 0% |
| case-18 | ✗→✓ | ▲ Improved | -46% | 0% |
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 文本字段清洗,使用正则表达式提取纯中文字符(过滤数字、特殊符号等)。
pythonimport re def extract_chinese(text): if pd.isna(text): return text # 仅保留 Unicode 中文字符范围 chinese_chars = re.findall(r'[一-龥]', str(text)) cleaned = ''.join(chinese_chars) return cleaned if cleaned else '' clean_col = '目标清洗列' # 占位示例,如'收货人' if clean_col in df.columns: df[clean_col] = df[clean_col].apply(extract_chinese)
Step2 动态模糊匹配列名,并统计该列中特定值的数量。
python# 动态查找包含特定关键字的列 keyword = 'type' target_val = 'varchar' target_col = next((col for col in df.columns if keyword in str(col).lower()), None) total_target_count = 0 details = [] if target_col is not None: # 忽略大小写和首尾空格进行匹配 mask = df[target_col].astype(str).str.lower().str.strip() == target_val count = mask.sum() total_target_count += count if count > 0: details.append({ 'sheet': target_sheet, 'target_count': count, 'total_rows': len(df) }) print(f"{'='*50}") print(f"匹配列 '{target_col}' 中值为 '{target_val}' 的总数: {total_target_count}") print(f"{'='*50}") for detail in details: print(f" {detail['sheet']}: {detail['target_count']} 个匹配项 (共 {detail['total_rows']} 行)")
Step3 将清洗和处理后的数据保存为 Excel,并输出文件大小与下载链接。
pythonoutput_path = "/mnt/data/cleaned_data_output.xlsx" df.to_excel(output_path, index=False) file_size = os.path.getsize(output_path) print(f"清洗后的数据已保存至: {output_path}") print(f"文件大小: {file_size} 字节") # 生成标准下载链接格式 print(f"下载链接: sandbox:{output_path}")
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-02 | fail→fail | 17,032 | 6,730 | -60% | 1 | 1 | 0% | 2,793 | 1,973 | -29% | 0 | 0 | — |
case-01 | fail→fail | 11,878 | 6,310 | -47% | 1 | 1 | 0% | 2,555 | 1,936 | -24% | 0 | 0 | — |
case-03 | fail→fail | 16,832 | 11,704 | -30% | 1 | 1 | 0% | 2,570 | 2,677 | +4% | 0 | 0 | — |
case-04 | fail→pass | 12,059 | 7,031 | -42% | 1 | 1 | 0% | 1,691 | 2,041 | +21% | 0 | 0 | — |
case-05 | pass→pass | 10,933 | 7,154 | -35% | 1 | 1 | 0% | 2,168 | 1,962 | -10% | 0 | 0 | — |
case-06 | pass→pass | 7,034 | 5,501 | -22% | 1 | 1 | 0% | 1,409 | 1,308 | -7% | 0 | 0 | — |
case-07 | pass→pass | 8,672 | 5,869 | -32% | 1 | 1 | 0% | 1,577 | 1,806 | +15% | 0 | 0 | — |
case-20 | pass→pass | 18,619 | 14,050 | -25% | 1 | 1 | 0% | 2,775 | 2,821 | +2% | 0 | 0 | — |
case-08 | pass→pass | 4,076 | 3,705 | -9% | 1 | 1 | 0% | 706 | 1,278 | +81% | 0 | 0 | — |
case-09 | fail→pass | 5,826 | 2,242 | -62% | 1 | 1 | 0% | 806 | 946 | +17% | 0 | 0 | — |
case-10 | pass→pass | 4,432 | 2,848 | -36% | 1 | 1 | 0% | 797 | 1,066 | +34% | 0 | 0 | — |
case-11 | pass→pass | 4,270 | 4,853 | +14% | 1 | 1 | 0% | 889 | 1,402 | +58% | 0 | 0 | — |
case-21 | pass→pass | 7,830 | 9,043 | +15% | 1 | 1 | 0% | 1,731 | 2,086 | +21% | 0 | 0 | — |
case-12 | pass→pass | 7,767 | 4,033 | -48% | 1 | 1 | 0% | 1,154 | 1,158 | +0% | 0 | 0 | — |
case-13 | fail→pass | 6,936 | 1,752 | -75% | 1 | 1 | 0% | 1,125 | 891 | -21% | 0 | 0 | — |
case-14 | fail→fail | 10,496 | 8,058 | -23% | 1 | 1 | 0% | 2,034 | 2,183 | +7% | 0 | 0 | — |
case-15 | pass→pass | 8,973 | 4,330 | -52% | 1 | 1 | 0% | 1,695 | 1,259 | -26% | 0 | 0 | — |
case-16 | fail→pass | 10,377 | 3,377 | -67% | 1 | 1 | 0% | 1,899 | 1,199 | -37% | 0 | 0 | — |
case-17 | pass→pass | 6,982 | 4,271 | -39% | 1 | 1 | 0% | 1,280 | 1,134 | -11% | 0 | 0 | — |
case-18 | fail→pass | 10,062 | 3,198 | -68% | 1 | 1 | 0% | 1,804 | 968 | -46% | 0 | 0 | — |
case-19 | fail→pass | 5,816 | 2,815 | -52% | 1 | 1 | 0% | 1,059 | 1,179 | +11% | 0 | 0 | — |
case-22 | pass→pass | 10,295 | 7,773 | -24% | 1 | 1 | 0% | 2,292 | 2,317 | +1% | 0 | 0 | — |
case-23 | pass→fail | 9,662 | 4,388 | -55% | 1 | 1 | 0% | 1,607 | 1,533 | -5% | 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. 23 cases were attempted. The headline lift of +22 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
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.