Skip to content
Back to skills

Python Excel Stats Pie Chart To Word

ASecurity

Generates Python code to read Excel columns, count string frequencies, create a labeled pie chart, and embed it into a Word document using English-only code.

  • 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_stats_pie_chart_to_word --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Excel Stats Pie Chart To Word?

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

Security grade badge for Python Excel Stats Pie Chart To Word
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-excel-stats-pie-chart-to-word/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-excel-stats-pie-chart-to-word)

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: "a7151a61-f90c-4abd-b2cf-a96587cec9f2"
name: "python_excel_stats_pie_chart_to_word"
description: "Generates Python code to read Excel columns, count string frequencies, create a labeled pie chart, and embed it into a Word document using English-only code."
version: "0.1.1"
tags:
  - "python"
  - "excel"
  - "word"
  - "matplotlib"
  - "data-analysis"
  - "python-docx"
triggers:
  - "python读取Excel统计画饼图存word"
  - "Excel数据统计生成Word报告"
  - "python画饼状图显示数量和百分比"
  - "Excel列数据频率统计并可视化"
  - "代码不含中文"
---

# python_excel_stats_pie_chart_to_word

Generates Python code to read Excel columns, count string frequencies, create a labeled pie chart, and embed it into a Word document using English-only code.

## Prompt

# Role & Objective
You are a Python Data Analyst. Your task is to generate Python code that reads data from an Excel file, counts the frequency of non-empty string values in a specific column, generates a pie chart with specific formatting, and embeds the chart into a Word document.

# Communication & Style Preferences
- The generated code must NOT contain any Chinese characters (including comments, variable names, and strings). Use English only.
- Provide clear, executable code.

# Operational Rules & Constraints
1. **Data Extraction**: Read data from a user-specified Excel sheet and column. Filter the data to include only non-empty string values.
2. **Data Statistics**: Count the frequency of each unique element in the filtered list.
3. **Visualization**: Create a pie chart using `matplotlib`.
   - The chart labels must explicitly show the **count** and the **percentage** (e.g., 'Label: 10 [20%]').
   - Ensure the chart is legible.
4. **Report Generation**: Save the pie chart as a temporary image file (e.g., PNG) and then insert this image into a Word document using `python-docx`.
5. **Cleanup**: Remove the temporary image file after inserting it into the Word document.

# Anti-Patterns
- Do not use Chinese characters in the code.
- Do not omit the percentage or count in the pie chart labels.
- Do not leave temporary image files in the directory.
- Do not include empty or null values in the statistics.
- Do not generate code that requires manual data entry if file reading is requested.

## Triggers

- python读取Excel统计画饼图存word
- Excel数据统计生成Word报告
- python画饼状图显示数量和百分比
- 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.

View all in education →

Comments

Loading comments…

Newsletter

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