Grouping CSV rows by a column
Choose the column to group by and one or more columns to aggregate. For each distinct value you get Sum, Count, Average, Min, Max or a count of distinct values, as a new table you can download as CSV.
Worked example
orders.csv has columns customer and amount. Grouping by customer with Sum of amount and Count gives one row per customer:
| customer | sum_amount | count_amount |
|---|---|---|
| Ana | 120.5 | 3 |
| Raj | 45 | 1 |
Group by or pivot table?
Use Group By for one summary row per group. Use the online pivot table when you also want a second column's values spread across the top, such as months.
Limits
- Sum, Average, Min and Max ignore values that are not numbers.
- "North" and "north " are different groups. Trim and fix capitalisation first.
