Install any skill in seconds. Free to start, no credit card required.
Get Started Free →用于大规模Excel数据的预处理,通过统计总行数判断是否转换为Parquet格式以提升读写效率,并使用正则表达式清洗指定文本列(如仅保留中文字符),最后导出清洗后的文件并提供下载链接。
.claude/skills/opensensenova-invalid-data-cleaning/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 7% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -57% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 195% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -22% | 0% |
| case-18 | ✗→✓ | ▲ Improved | -45% | 0% |
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 根据总行数判断是否数据量过大,若满足条件,则将 Excel 文件转换为 Parquet 格式提升读写效率,再读取数据进行后续分析。
pythonimport pandas as pd file_path = "input_data.xlsx" parquet_path = "temp_data.parquet" # 读取 Excel 文件并转换为 Parquet 格式 xls = pd.ExcelFile(file_path) dfs = [] for sheet in xls.sheet_names: df_sheet = pd.read_excel(xls, sheet_name=sheet) dfs.append(df_sheet) # 合并所有 sheet 数据并写入 Parquet 文件 if dfs: df_all = pd.concat(dfs, ignore_index=True) df_all.to_parquet(parquet_path, engine='pyarrow', index=False) # 读取 Parquet 文件用于后续处理 df = pd.read_parquet(parquet_path)
Step2 对目标文本字段中的特殊字符(如 #、-、数字)进行清洗,使用正则表达式仅保留中文字符。
pythonimport pandas as pd import re target_col = 'target_column' # 替换为实际需要清洗的列名 # 定义清洗函数 def clean_chinese_text(text): if pd.isna(text): return text s = str(text) # 提取所有中文字符(Unicode 范围:[一-鿿]) chinese_chars = re.findall(r'[一-鿿]', s) cleaned = ''.join(chinese_chars) return cleaned if cleaned else '' # 应用清洗函数 if target_col in df.columns: df[target_col] = df[target_col].apply(clean_chinese_text)
Step3 将清洗后的数据保存为表格文件(.xlsx),并在报告中提供本地下载链接。
pythonimport pandas as pd # 保存清洗后的数据为 .xlsx 文件 output_path = "cleaned_data.xlsx" df.to_excel(output_path, index=False) print("清洗后的数据已保存至:", output_path) # 生成本地文件下载链接 print("下载链接:", f"file://{output_path}")
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 12,160 | 8,925 | -27% | 1 | 1 | 0% | 2,353 | 2,514 | +7% | 0 | 0 | — |
case-02 | fail→fail | 11,235 | 6,268 | -44% | 1 | 1 | 0% | 1,835 | 1,805 | -2% | 0 | 0 | — |
case-03 | fail→fail | 8,068 | 9,830 | +22% | 1 | 1 | 0% | 437 | 2,170 | +397% | 0 | 0 | — |
case-04 | pass→pass | 6,956 | 5,224 | -25% | 1 | 1 | 0% | 1,281 | 1,551 | +21% | 0 | 0 | — |
case-05 | fail→pass | 15,817 | 3,838 | -76% | 1 | 1 | 0% | 3,034 | 1,311 | -57% | 0 | 0 | — |
case-06 | pass→pass | 2,384 | 1,725 | -28% | 1 | 1 | 0% | 341 | 855 | +151% | 0 | 0 | — |
case-07 | pass→pass | 10,160 | 4,081 | -60% | 1 | 1 | 0% | 1,843 | 1,285 | -30% | 0 | 0 | — |
case-08 | pass→pass | 11,005 | 8,757 | -20% | 1 | 1 | 0% | 2,029 | 2,156 | +6% | 0 | 0 | — |
case-09 | pass→pass | 9,484 | 7,238 | -24% | 1 | 1 | 0% | 1,503 | 1,628 | +8% | 0 | 0 | — |
case-10 | pass→pass | 5,133 | 2,131 | -58% | 1 | 1 | 0% | 992 | 932 | -6% | 0 | 0 | — |
case-11 | fail→pass | 2,083 | 2,208 | +6% | 1 | 1 | 0% | 319 | 942 | +195% | 0 | 0 | — |
case-12 | pass→pass | 1,660 | 1,892 | +14% | 1 | 1 | 0% | 251 | 797 | +218% | 0 | 0 | — |
case-13 | pass→pass | 12,730 | 5,353 | -58% | 1 | 1 | 0% | 1,776 | 1,232 | -31% | 0 | 0 | — |
case-14 | fail→pass | 8,699 | 3,934 | -55% | 1 | 1 | 0% | 1,753 | 1,366 | -22% | 0 | 0 | — |
case-15 | pass→pass | 5,216 | 3,442 | -34% | 1 | 1 | 0% | 990 | 1,072 | +8% | 0 | 0 | — |
case-16 | pass→pass | 5,560 | 1,870 | -66% | 1 | 1 | 0% | 796 | 894 | +12% | 0 | 0 | — |
case-17 | pass→pass | 8,825 | 3,894 | -56% | 1 | 1 | 0% | 1,788 | 1,304 | -27% | 0 | 0 | — |
case-18 | fail→pass | 9,188 | 3,010 | -67% | 1 | 1 | 0% | 1,473 | 811 | -45% | 0 | 0 | — |
case-19 | fail→pass | 3,594 | 1,757 | -51% | 1 | 1 | 0% | 581 | 760 | +31% | 0 | 0 | — |
case-20 | pass→pass | 8,916 | 7,741 | -13% | 1 | 1 | 0% | 1,600 | 1,855 | +16% | 0 | 0 | — |
case-21 | pass→pass | 7,141 | 6,915 | -3% | 1 | 1 | 0% | 1,499 | 1,591 | +6% | 0 | 0 | — |
case-22 | pass→pass | 6,119 | 5,237 | -14% | 1 | 1 | 0% | 1,161 | 1,633 | +41% | 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, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +27 percentage points is the difference between those two pass rates over the 21 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.