Pandas datetime groupby

data.groupby(data.date.dt.year)
ashattack