1b = pd.read_csv('b.dat')
2b.index = pd.to_datetime(b['date'],format='%m/%d/%y %I:%M%p')
3b.groupby(by=[b.index.month, b.index.year])
4# or
5b.groupby(pd.Grouper(freq='M')) # update for v0.21+
6# or
7df.groupby(pd.TimeGrouper(freq='M'))
1max_temp = dfall.groupby([(dfall.Date.dt.month),(dfall.Date.dt.day)])['Data_Value'].max()
2