Aggregation
Aggregation is the process of combining data values into summaries to make it easier to understand and analyze. It involves applying mathematical functons, such as sum, average, count, maximum or minimum, to groups of data. For example, calculating total loan amount by branch or finding the average interest rate across all loans.
The different methods to apply aggregations are as follows
Using tools such as:
-
SQL: Use GROUP BY with aggregation functions like SUM, AVG, COUNT.
-
Python (Pandas ): Use groupby() and aggregation methods.
The various aggregation methods are:
-
SUM: Total of numeric values (e.g., total loan amount).
-
AVG: Average of values (e.g., average loan interest rate).
-
COUNT: Number of records in each group (e.g., number of loans per region).
-
MAX/MIN: Highest or lowest value in a group (e.g., highest loan amount).