I'm trying to do a groupby/ sum to a dataframe,
this is my code:
stage1.groupby(['Year']).sum().max())
it is giving me the value of the maximum sum which is great but I would like to know how to get the year value as well.
Any help would be much appreciated.
also any idea why I can't access the values of a groupby/sum to plot it: years= table['Year'].values values=table['Value'].values