In short.
Category Statistics is a skill for assistants and Python analysts who need categorical summaries, but its examples need adaptation for dependable spreadsheet reporting. It counts cleaned labels, calculates percentages of retained rows and provides three chart outputs. Workbook loading is absent, cleaning rules are narrow, and the horizontal chart substitutes numbered labels for original category names. Runtime behavior and image quality were not assessed; no code was executed.
Researched and written by an AI model and checked by a second AI model. How it works
Covers skills/sn-da-excel-workflow/capability/excel-data-statistics/category-statistics/SKILL.md in OpenSenseNova/SenseNova-Skills at commit 07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b, together with the supplied repository-level LICENSE. The manifest lists no other files in the selected folder. The wider Excel workflow, other repository skills, assistant integration and dependency behavior were not assessed. No code was executed.
The overview
Identity
The resource is the category-statistics skill in OpenSenseNova/SenseNova-Skills, under skills/sn-da-excel-workflow/capability/excel-data-statistics/category-statistics. Its SKILL.md contains Chinese instructions and three Python functions for counting categories and producing charts.
The original folder is [https://github.com/OpenSenseNova/SenseNova-Skills/tree/main/skills/sn-da-excel-workflow/capability/excel-data-statistics/category-statistics]. Despite the surrounding Excel workflow name, the supplied functions begin with an existing pandas DataFrame.
Assessment
This is a useful starting point for someone who can prepare tabular data and adapt Python examples. The statistical function and basic chart have a clear purpose, while the composite report adds presentation options.
Adoption requires decisions about invalid labels, missing data and chart labeling. The supplied file does not establish a complete workbook-to-report process, supported assistant integration or reliable behavior across datasets.
Users
It fits analysts and developers who already use pandas, and assistant users who can review generated Python. Typical questions include how many records belong to each category and what share of valid records each category represents.
Beginners will need help loading data, selecting the category column and configuring the Python environment. Experienced users can reuse the functions while replacing the cleaning rules, Chinese labels and placeholder grouping logic.
Capabilities
calculate_distribution checks for the requested column, removes missing values and two exact placeholder labels, then returns category counts and percentages. Its default column name is 类别.
generate_and_save_basic_chart combines count bars with a percentage line on a second axis. generate_comprehensive_report produces a combined pie-and-bar image and a separate horizontal bar image. All three image saves specify 300 dpi.
Using it
Requirements
The examples require Python, pandas, Matplotlib, a DataFrame containing the chosen column and writable output locations. Python and dependency versions are unspecified.
Chinese chart text requires a suitable installed font. The code lists several font preferences, but their availability and rendering are unknown. No supported assistant host, model, installation mechanism or Excel-reading dependency is specified.
Mechanism
The cleaning expression drops missing values, replaces exact occurrences of '--' and '代码' with missing values, and drops those replacements. value_counts then counts remaining labels, normally ordering them by frequency. Each percentage is its count divided by the total retained count, multiplied by 100.
The plotting functions consume the returned counts and percentages. The horizontal chart uses numbered category labels and assigns groups by checking whether each original label contains the example keyword '关键字A'. That keyword rule is a template requiring a meaningful replacement.
Setup
Prepare an environment containing pandas and Matplotlib, load the three function definitions, and provide a DataFrame. Call calculate_distribution with the actual category-column name, then pass its returned counts and percentages to the desired plotting function.
Create output directories beforehand. The composite function builds paths by direct string concatenation, so output_dir needs a trailing path separator. Its default './' already includes one. The source provides no assistant registration instructions or workbook-loading step.
Example
Consider a hypothetical 类别 column containing A, A, B, a missing value, '--' and '代码'. The documented cleaning retains three rows. Hand calculation gives A a count of 2 and approximately 66.7%, and B a count of 1 and approximately 33.3%. This is an illustrative calculation, not an execution result.
The default basic-chart filename is category_distribution.png. The composite function names its images category_pie_bar.png and category_hbar.png. The horizontal image would label these categories with numbered Chinese labels unless its labeling code is changed.
Assessment & evidence
Limitations
Cleaning recognizes only missing values and the exact labels '--' and '代码'. It does not trim whitespace, merge spelling variants or normalize capitalization. A legitimate category named '代码' would be removed. Percentages exclude all removed rows, and the functions do not report how many rows were excluded.
There is no explicit guard for an empty cleaned result. The composite chart uses a four-color palette, while the horizontal chart omits original category names and uses illustrative grouping. Suitability for numerous categories or long labels is unassessed.
The source contains no workbook import, automated tests or dependency pins. Plotting changes global Matplotlib settings, fixed output names can replace existing files, and output directories are not created automatically.
Reasoning
The counts and percentages describe the same cleaned category column, making the basic chart a direct way to compare frequency and share. The denominator is the number of retained records, so interpretation depends on whether the cleaning rules match the dataset.
Recording original and excluded row totals would make the percentages easier to interpret. Preserving actual category names in the horizontal chart would also make that view usable without a separate mapping.
Alternatives
Within the supplied skill, use calculate_distribution alone when numeric summaries are sufficient, the basic chart for a compact visual, or the composite report for additional views of the same distribution.
No named external alternatives or comparative measurements are supplied. Relative cost, usability and performance against other resources are unknown.
Evidence
The supplied material contains the selected folder's SKILL.md and the repository-level LICENSE. The immutable skill source is [https://raw.githubusercontent.com/OpenSenseNova/SenseNova-Skills/07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b/skills/sn-da-excel-workflow/capability/excel-data-statistics/category-statistics/SKILL.md].
The corresponding licence is [https://raw.githubusercontent.com/OpenSenseNova/SenseNova-Skills/07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b/LICENSE]. No example workbook, generated chart, test result or runtime log is supplied. No code was executed; runtime correctness, compatibility and rendering remain unverified.
Access & freshness
Costs
The MIT licence grants permission to use the supplied software and documentation free of charge. No service pricing, execution-cost figures or resource-use measurements are supplied.
Total operating cost is unknown. Any assistant-provider charges or computing costs depend on an unspecified deployment.
Rights
The supplied repository-level MIT licence names SenseNova as the 2026 copyright holder. It permits use, copying, modification, publication, distribution, sublicensing and sale of the software and associated documentation.
Copies or substantial portions must retain the copyright and permission notices. The licence provides the software without warranty. It does not establish rights to any datasets a user supplies.
Freshness
This description applies to repository commit 07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b, captured on 2026-11-16 at 22:40:17.840 UTC. Later changes, a release version and the file's update history are not established by the supplied material.
Actions
Before adopting the skill, define valid and invalid labels for your dataset, retain excluded-row totals, and add handling for an empty result. Replace the horizontal chart's numbered labels and example keyword grouping with meaningful category information.
Evaluate the adapted functions with representative data, including long labels and more than four categories. Confirm fonts, output paths and dependency versions, and compare computed totals with a small hand-counted example before using the images in a report.
