Преобразовать группу Pandas, чтобы DICT

res = dict(tuple(d.groupby('a')))
Magnificent Moth