agentsclimarketplace

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

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/python-excel数据统计与饼状图绘制

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

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill python-excel数据统计与饼状图绘制

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.9 KB, 456 tokens by cl100k_base, as published. Nobody here has run it

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饼状图显示数量占比
  • 代码不含中文画饼图

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.