Hey i have a data frame which contains many columns, when i try to sort them after i grouped them it says this Cannot access callable attribute 'sort_values' of 'DataFrameGroupBy' objects, try using the 'apply' method
the code is here df.groupby('year').sort_values(by = 'population')