Aggregating and grouping
Is a common use case to want to calculate the minimum, maximum, or any other aggregation in a dataset while considering a common set of values in another column. Here, we can use a practice called grouping. Let's try to explain this concept using the following diagram:
In the previous example, we are summing the sepal_lenght
values that are from the same species. Now, let's learn how to use grouping and aggregation in Optimus.
For example, we have the following dataframe:
df = op.load.file("foo.csv") df.print()
The dataframe contains the following data:
name job id (object) (object) (int64) ---------- ---------- --------- optimus ...