The data look like this:
id,outer,inner1,inner2,inner3
123,"Smith,John",a,b,c
123,"Smith,John",d,e,f
123,"Smith,John",g,h,i
456,"Williams,Tim",xx,yy,zz
456,"Williams,Tim",vv,ww,uu
456,"Miller,Ray",rrr,sss,ttt
456,"Miller,Ray",qqq,www,ppp
I would like the resulting dictionary to be
{'123': {'Smith,John': 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'},
'456': {'Williams,Tim': 'xx', 'yy', 'zz', 'vv', 'ww', 'zz'},
{'Miller,Ray': 'rrr', 'sss', 'ttt', 'qqq', 'www', 'ppp'}}
I tried adapting the accepted answer from Python Creating A Nested Dictionary From CSV File, but this method overwrites the dictionary at every row, so only the final row from each id ends up in the dictionary.