CSV Pivot & Group-By Summary
Group a CSV by a column and sum, count, average, min, max, median or count distinct a value column — or pivot a second column into wide columns, with totals.
A summary table as CSV and Markdown: one row per group (and one column per pivot value), totals, the number of rows read and the cells that could not be read as numbers.
Example: Sales by region × product: EU A 1,200 + B 300 = 1,500; US A 500 + 250 = 750 (one "n/a" cell skipped); grand total 2,250. Mean by region: EU 750, US 375, overall 562.5.
GROUP BY
in the browser.
How groups, aggregates and pivot columns are formed, and how numbers are read.
Groups and aggregates
Rows are grouped by the column you name; the value column is then summed, counted, averaged, min/max-ed, or its median or number of distinct values taken, per group — count and distinct work on any text, the others need numbers. Groups sort by name (natural order) or by their value.
Pivot
Naming a second column turns its distinct values into output columns: each cell is the aggregate of the rows that share both the group and the pivot value, with a Total column per group and a Total row per column. For mean, median and distinct the totals are recomputed over all the rows in scope, not derived from the group figures.
Numbers
Cells are read leniently: thousands separators, a leading currency symbol, a trailing %, parentheses for negatives and a decimal comma when there is no decimal point. A cell that still is not a number is skipped and counted, never treated as zero. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.
SOURCES
- GROUP BY aggregates (count, sum, mean, min, max, median, distinct) over a value column; lenient numbers (thousands, currency, parentheses, decimal comma); Total row = aggregate over all rows
Last reviewed 21 September 2026. How results are checked: How we verify.