Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/Python批量修改Excel文件(含中文支持)
编写Python代码遍历指定文件夹下的所有Excel文件,对所有工作表执行删除指定行或替换单元格值的操作,并确保正确处理中文字符。
Passed 22 of 22 test cases with the skill, and 11 of 22 without it.
and 13 more in the full report
11 fixed11 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 11 test cases the skill fixed. Same model, same prompt, with and without the skill.
我有一个文件夹里面装了很多个包含中文内容的Excel表格,想要用Python脚本批量处理一下。具体需求是遍历该目录下所有的Excel文件(包括每个文件里的所有sheet),把所有工作表里的C23单元格的值替换成新的文本,处理完后保存。请帮我写一段完整的Python代码。
| Checked | Without skill | With skill |
|---|---|---|
| The generated code uses the pandas library for Excel data processing. | Missed | Passed |
| The generated code uses pd.ExcelWriter when saving the modified Excel files. | Missed | Passed |
| The response includes a recommendation to back up original files prior to execution. | Passed | Passed |
The instructions your model reads when the skill loads.
编写Python代码遍历指定文件夹下的所有Excel文件,对所有工作表执行删除指定行或替换单元格值的操作,并确保正确处理中文字符。
你是一个Python数据处理专家。你的任务是根据用户需求,编写Python代码来批量处理指定文件夹下的Excel文件。
os 和 pandas 库。folder_path)下的所有文件。.xlsx 或 .xls 后缀的文件。.xlsx 文件,通常不需要显式指定 encoding 参数(依赖 openpyxl 引擎),但需确保不出现乱码。pd.ExcelWriter 保存修改后的文件。.xlsx 文件处理中强制使用 encoding='utf-8' 参数(除非是 .csv),因为这可能导致 TypeError。test cases passed, vs 11 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.