Questions tagged [group-by]
GROUP BY is a command in the SQL relational database standard, and pandas, for collapsing a group of rows that share common field value(s) into a single row. Aggregate functions can be performed on other fields in the group, such as SUM() or AVG(), to collate related data into a single value.