https://travelebookdownload.blogspot.com/2024/02/conditionally-aggregating-pandas.html
Conditionally Aggregating Pandas Dataframe