Skip to content
Skills Library
Documents & office · Analysis

excel_dedupe

/excel_dedupe

按指定列或整行给 Excel 去重,返回重复行与保留行的对应关系,可导出干净数据。当用户提到 Excel 去重、删除重复项、重复数据、查重时使用。

Licence
Apache-2.0
Last repository change
26.10.2026

Assessment and security

86/ 100Class: good
Format20 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability21 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content30 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: __init__.py

What it does and when to use it

按指定列或整行给 Excel 去重,返回重复行与保留行的对应关系,可导出干净数据。当用户提到 Excel 去重、删除重复项、重复数据、查重时使用。

Original author description

按指定列或整行给 Excel 去重,返回重复行与保留行的对应关系,可导出干净数据。当用户提到 Excel 去重、删除重复项、重复数据、查重时使用。

How it works

  1. 功能描述
  2. 所属分类
  3. 调用方式
  4. 参数说明
  5. 返回值
  6. 使用示例
  7. 原始函数
Original SKILL.md headings · 58 lines, 154 words
SKILL.md preview
---
name: excel_dedupe
description: 按指定列或整行给 Excel 去重,返回重复行与保留行的对应关系,可导出干净数据。当用户提到 Excel 去重、删除重复项、重复数据、查重时使用。
---

# excel_dedupe Skill

> 按指定列给 Excel 去重,并说明哪一行和哪一行重复

## 功能描述

按一个列、多个列或整行判断重复,保留第一次(或最后一次)出现的记录,
同时返回重复明细:重复的是第几行、和保留的第几行重复、去重键是什么。
只给「去重后剩多少行」往往不够排查问题,所以重复明细是重点。

## 所属分类

`skills/excel/excel_dedupe/`

## 调用方式

```python
from skills.excel import excel_dedupe

excel_dedupe(
    excel_path='客户名单.xlsx',
    key_columns=['手机号'],
    output_path='去重后.xlsx',
)
```

## 参数说明

| 参数 | 类型 | 必填 | 默认值 | 说明 |
|------|------|------|--------|------|
| `excel_path` | str | 是 | - | 需要去重的 Excel 路径 |
| `key_columns` | str \| list | 否 | `None` | 去重列,单个列名或列名列表;默认整行 |
| `sheet_name` | str | 否 | `None` | 工作表名,默认取第一个 |
| `keep` | str | 否 | `'first'` | 重复时保留 `'first'` 或 `'last'` |
| `case_sensitive` | bool | 否 | `True` | 文本是否区分大小写 |
| `output_path` | str | 否 | `None` | 去重结果输出路径 |

## 返回值

`dict`,包含 `sheet`、`key_columns`、`total`、`unique`、`duplicate_count`、
`duplicates`、`output_path`。`duplicates` 每项含 `row`、`kept_row`、`key`。

## 使用示例

```python
from skills.excel import excel_dedupe

result = excel_dedupe('客户名单.xlsx', key_columns='手机号')
print('共 {} 行,去重后 {} 行'.format(result['total'], result['unique']))
for item in result['duplicates']:
    print('第 {} 行与第 {} 行重复:{}'.format(item['row'], item['kept_row'], item['key']))
```

## 原始函数

`contributors/my12yyds/excel_dedupe.py`
Files in this package (2)
  • SKILL.md 2 KB
  • __init__.py 1 KB

Versions

The database has no other skills named excel_dedupe.

Database snapshot: 13.11.2026 · package version 4d1ba357dc53 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90excel_diff
    比对两份 Excel 表格的差异,按位置或按主键找出修改、新增、删除的行,可导出差异表。当用户提到对比 Excel、Excel 差异、两份表格有什么不同、核对表格时使用。
  • 90batch_rename_by_excel
    按 Excel 中记录的新旧文件名映射批量重命名文件。当用户提到按表格/清单批量改名、按 Excel 对照表重命名文件、批量修改文件名但改名规则已列在表格里时使用。
  • 100excel-macro-creator
    Create excel macro creator operations. Auto-activating skill for Business Automation. Triggers on: excel macro creator, excel macro creator Part of the Business Automation skill category. Use when working with excel macro creator functionality. Trigger with phrases like "excel…
  • 100excel-formula-generator
    Generate excel formula generator operations. Auto-activating skill for Business Automation. Triggers on: excel formula generator, excel formula generator Part of the Business Automation skill category. Use when working with excel formula generator functionality. Trigger with…
  • 100carta-reporting-excel
    Internal subskill for carta-reporting. Exports Carta report data to a branded Excel file. Invoked by carta-reporting or carta-reporting-markdown when the user requests Excel output. Also the entry point when the main skill receives a message starting with "Generate Carta Excel…
  • 93excel-link
    读取、统计、修改和新建 Excel/WPS 表格(.xlsx、.xlsm、.xls、.csv)。用户要整理或汇总工程数据、做计算表、按公式计算、统计分析、画曲线图或柱状图,或在已有表格中填数、改公式时,都使用本技能,即使用户没有提到 Excel。

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.