Solution for SpecificationError: nested renamer is not supported while agg() along with groupby()
change to reason: in new pandas version named aggregation is the recommended replacement for the deprecated “dict-of-dicts” approach to naming the output of column-specific aggregations (Deprecate groupby.agg() with a dictionary when renaming). source: https://pandas.pydata.org/pandas-docs/stable/whatsnew/v0.25.0.html