suppose I have a dataframe with index as monthy timestep, I know I can use dataframe.groupby(lambda x:x.year) to group monthly data into yearly and apply other oper
dataframe.groupby(lambda x:x.year)
Use the year attribute of index:
df.groupby(df.index.year)