for index, data in enumerate(sorted(list(groups.values()), key=lambda d: np.mean(d))
    ):
    print('{i}: {d}'.format(i=index, d=data))
grouping objects to achieve a similar mean property for all groups