nested renamer is not supported pandas code example
Example 1: nested renamer is not supported pandas
temp['total'] = pd.DataFrame(project_data.groupby(col1)[col2].agg(total='count')).reset_index()['total']
temp['Avg'] = pd.DataFrame(project_data.groupby(col1)[col2].agg(Avg='mean')).reset_index()['Avg']
Example 2: nested renamer is not supported pandas
df.groupby(['col']).agg({'func': func})
to
df.groupby(['col']).agg(func=func)