I need to write a function: def group_and_aggregate_data(dfd.DataFrame, group_by_column:str, agg_func) -> pd.DataFrame that groups my Excel data by city name and applies the agg_func passed as an argument. I tried this: def group_and_aggregate_data(dataframe, cond, func): df_bycity = dataframe.groupby(cond).func() return df_bycity but it doesn't work in Python. Continue reading...