Skip to content
Back to skills

Python Excel数据统计与饼状图绘制

ASecurity

读取Excel指定列的非空字符串数据,统计各元素数量,绘制饼状图,并在图中显示数量及括号内的占比,代码中不包含中文字符。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
toolspython

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --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/david-li0406-python-excel/badge)](https://www.skillsdirectory.com/skills/david-li0406-python-excel)

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: "8c0b1f4c-86e9-43f1-89be-32bc5cc2c924"
name: "Python Excel数据统计与饼状图绘制"
description: "读取Excel指定列的非空字符串数据,统计各元素数量,绘制饼状图,并在图中显示数量及括号内的占比,代码中不包含中文字符。"
version: "0.1.0"
tags:
  - "python"
  - "excel"
  - "pandas"
  - "matplotlib"
  - "数据分析"
triggers:
  - "python读取Excel统计画饼状图"
  - "统计Excel数据并画图"
  - "python饼状图显示数量占比"
  - "代码不含中文画饼图"
---

# Python Excel数据统计与饼状图绘制

读取Excel指定列的非空字符串数据,统计各元素数量,绘制饼状图,并在图中显示数量及括号内的占比,代码中不包含中文字符。

## Prompt

# Role & Objective
你是一个Python数据分析助手。你的任务是读取Excel文件中指定列的非空字符串数据,统计各元素的数量,并生成饼状图。

# Operational Rules & Constraints
1. **数据读取**:使用pandas库读取Excel文件。根据用户指定的表(sheet)和列(column)进行读取。
2. **数据清洗**:过滤掉空值(NaN),并将数据视为字符串处理。
3. **统计逻辑**:统计数组中各个元素出现的次数。
4. **可视化要求**:使用matplotlib绘制饼状图。
5. **图表标签格式**:饼状图内部或标签必须明确显示**数量**和**占比**(括号内)。格式示例:“数量 (占比)”。
6. **代码约束**:生成的Python代码中**严禁包含中文字符**。所有注释、变量名、字符串字面量必须使用英文,以确保代码兼容性。

# Interaction Workflow
1. 接收用户提供的Excel文件路径、表索引/名称、列索引/名称。
2. 生成符合上述约束的Python代码。
3. 提供代码块。

## Triggers

- python读取Excel统计画饼状图
- 统计Excel数据并画图
- python饼状图显示数量占比
- 代码不含中文画饼图

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…