Introduction
GroupBy helps you organize items into groups based on a shared property. It makes it easy to see which items belong together.
When you want to count how many items share the same category.
When you want to list items grouped by a common feature, like all students by their grade.
When you want to summarize data by groups, like total sales per product.
When you want to separate a list into smaller lists based on a key.