I have a pandas dataframe with dates on each row, I would like to groupby a second column and sort the dates then assign letter A to the first date and B to the second etc. See