There are a number of questions on this topic but I have not yet been able to adapt solutions to fit my case. Supposed I have a list of dictionaries that I got from a flat file:
Use a defaultdict for ease of processing these entries:
output = defaultdict(dict) for person in people: output[person['Name']][person['Attribute']] = person['Value']