https://bagelmobestcheapprice.blogspot.com/2023/08/aggregate-grouped-data-conditionally.html
Aggregate Grouped Data Conditionally Over Many Columns Doing Different Operations In Python/pandas