Data Aggregation and Group Operations#

Another important tool for data analysis, is the ability to group and categorize data, for computing some statistics with aggregate operations to each group, or maybe pivoting a table for statistical visualization purposes.

Both pandas and Kotlin DataFrame follow the split-apply-combine strategy ([Wic11]).

Split-Apply-Combine demonstration

This strategy involves breaking down a dataset into smaller subsets, performing a specific analysis or transformation on each subset, and then combining the result into a single output.

In the following section we will see in depth how Kotlin DataFrame compute grouping operations, data aggregation and table pivoting in comparison with pandas.