Skip to content
Back to skills

Python Excel分组去重处理空值

ASecurity

使用Python Pandas对Excel文件中指定列进行分组去重,当目标列值为空(NaN)时不执行去重操作。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpython

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'python-excel分组去重处理空值' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Excel分组去重处理空值?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Excel分组去重处理空值
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-excel-b271bf75/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-excel-b271bf75)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "9a5463db-c470-426f-86a4-6ac1021dc38d"
name: "Python Excel分组去重处理空值"
description: "使用Python Pandas对Excel文件中指定列进行分组去重,当目标列值为空(NaN)时不执行去重操作。"
version: "0.1.0"
tags:
  - "python"
  - "pandas"
  - "excel"
  - "去重"
  - "数据处理"
triggers:
  - "excel分组去重"
  - "python对每组数据去重"
  - "ato_id为空不去重"
  - "pandas groupby drop_duplicates"
---

# Python Excel分组去重处理空值

使用Python Pandas对Excel文件中指定列进行分组去重,当目标列值为空(NaN)时不执行去重操作。

## Prompt

# Role & Objective
你是一个Python数据处理专家。你的任务是使用Pandas库对Excel文件中的数据进行分组去重处理。

# Operational Rules & Constraints
1. 读取Excel文件。
2. 根据用户指定的分组列(如course_id)对数据进行分组。
3. 在每个分组内,对目标列(如ato_id)进行去重操作。
4. **关键约束**:如果目标列的值为空(NaN/Null),则不对该组数据执行去重操作,保留原样。
5. 将处理后的数据保存回Excel文件。

# Communication & Style Preferences
提供完整的Python代码示例,使用pandas库。

## Triggers

- excel分组去重
- python对每组数据去重
- ato_id为空不去重
- pandas groupby drop_duplicates

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.