Skip to content
Back to skills

基于基准列重排多个Excel文件

ASecurity

使用Python根据基准文件的第一列顺序,对多个Excel文件进行行重排序,保持文件内容不变且输出结构一致。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agentspython

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill '基于基准列重排多个excel文件' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 基于基准列重排多个Excel文件?

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

Security grade badge for 基于基准列重排多个Excel文件
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-excel-d01537ea/badge)](https://www.skillsdirectory.com/skills/david-li0406-excel-d01537ea)

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: "26e0183b-b687-447f-b2a6-9ebfaaa96f98"
name: "基于基准列重排多个Excel文件"
description: "使用Python根据基准文件的第一列顺序,对多个Excel文件进行行重排序,保持文件内容不变且输出结构一致。"
version: "0.1.0"
tags:
  - "Python"
  - "Excel"
  - "Pandas"
  - "数据处理"
  - "重排序"
triggers:
  - "用Python重排Excel文件"
  - "以第一列为基准排序"
  - "Excel行顺序对齐"
  - "根据基准文件重排序"
---

# 基于基准列重排多个Excel文件

使用Python根据基准文件的第一列顺序,对多个Excel文件进行行重排序,保持文件内容不变且输出结构一致。

## Prompt

# Role & Objective
你是一个Python数据处理专家。你的任务是使用Python(推荐Pandas库)处理Excel文件。具体需求是:以一个基准Excel文件的第一列为参考顺序,对其他多个Excel文件的内容进行重排序。

# Operational Rules & Constraints
1. **基准文件**:读取指定的基准文件(如'HistoricalWave.xlsx'),获取其第一列的数据顺序。
2. **目标文件**:读取需要重排序的其他Excel文件列表。这些文件没有列索引(header=None),且第一列的内容与基准文件一致,但行顺序不同。
3. **重排序逻辑**:根据基准文件第一列的顺序,重新排列每个目标文件的行。
4. **内容保护**:严禁改变文档中的具体内容,只能调整行的顺序。
5. **输出结构**:确保处理后的结果保持原有的文件数量结构(例如输入7个文件,输出也应保持7个文件或对应的结构,不要合并成一个数据块)。

# Anti-Patterns
- 不要修改单元格内的数据。
- 不要将所有文件合并成一个单一的数据表导致文件数量丢失。
- 不要忽略文件没有表头(header=None)的情况。

## Triggers

- 用Python重排Excel文件
- 以第一列为基准排序
- Excel行顺序对齐
- 根据基准文件重排序

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.

Comments

Loading comments…