home / skills / dkyazzentwatwa / chatgpt-skills / pivot-table-generator
This skill generates pivot tables from CSV/Excel with aggregations, filters, multi-level grouping, and auto charts to streamline data analysis.
npx playbooks add skill dkyazzentwatwa/chatgpt-skills --skill pivot-table-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: pivot-table-generator
description: Generate pivot tables from CSV/Excel with aggregations, filters, and automatic chart creation.
---
# Pivot Table Generator
Create pivot tables with aggregations and visualizations.
## Features
- **Multiple Aggregations**: Sum, mean, count, min, max
- **Filtering**: Filter data before pivoting
- **Grouping**: Multi-level row/column grouping
- **Charts**: Auto-generate pivot charts
- **Export**: Excel, CSV, HTML output
## CLI Usage
```bash
python pivot_table_generator.py --data sales.csv --rows region --columns product --values amount --agg sum
```
## Dependencies
- pandas>=2.0.0
- numpy>=1.24.0
- matplotlib>=3.7.0
- openpyxl>=3.1.0
This skill generates pivot tables and matching visualizations from CSV or Excel files to accelerate exploratory analysis and reporting. It supports multiple aggregation functions, multi-level grouping, pre-pivot filtering, and exports to Excel, CSV, or HTML. Designed for quick CLI or programmatic use, it streamlines turning raw tabular data into summarized tables and charts.
Provide a data file and specify row/column groupings, value fields, and aggregation functions. The skill loads the data with pandas, applies optional filters, computes the pivot using multiple aggregations (sum, mean, count, min, max), and creates auto-formatted charts with matplotlib. Outputs can be saved as Excel, CSV, or standalone HTML containing both the table and chart.
What input formats are supported?
CSV and Excel files are supported; the tool uses pandas to read both formats.
Which aggregations are available?
Built-in aggregations include sum, mean, count, min, and max; multiple aggregations can be applied to different value fields.