Packs / data-science-public
pivot-summary
summarise a CSV by one or two columns (sum, count, mean) into a markdown pivot table
Install
logicpacks pack use data-science-public/pivot-summaryget_pack data-science-public/pivot-summaryThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
python-stdlibpandas - Checks: 1 in
outcome/checks.yaml - Code:
pivot.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
Summarise a CSV by one or two columns (sum, count, mean) into a markdown pivot table.
Steps
- Choose the question (e.g. sales by region by month).
- Run pivot.py with rows/cols/value/agg.
- Paste the markdown into the report.
Edge cases
- Missing combinations show as empty cells, not zero.
- Non-numeric values in the value column fail loudly.
Don'ts
- Don't average averages; pivot from raw rows.
Routes (free first)
python-stdlib:code/pivot.py(no install).pandas(free): same job in pandas for large files (pip install pandas)