I am trying to achieve the following: aggregate_commitment_df = commitment_df.group_by("sprint_start_date", "squad").agg( stories_committed=pl.count(pl.col("issue_type") == "Story"), spikes_committed=pl.count(pl.col("issue_type") == "Spike"), bugs_committed=pl.count(pl.col("issue_type") == "Bug"), story_points_committed=pl.sum("story_points"), ) where, for example, stories_committed will be the count of all rows with issue_type == "Story" for each sprint_start_date and squad. Continue reading...