dataframe groupby datetime day code example
Example 1: groupby year datetime pandas
data.groupby(data.date.dt.year)
Example 2: group by month and day pandas
max_temp = dfall.groupby([(dfall.Date.dt.month),(dfall.Date.dt.day)])['Data_Value'].max()