A Pandas DataFrame contains column named "date" that contains non-unique datetime values. I can group the lines in this frame using:
data.groupby(data['date'])
However, this splits the data by the datetime values. I would like to group these data by the year stored in the "date" column. This page shows how to group by year in cases where the time stamp is used as an index, which is not true in my case.
How do I achieve this grouping?