Grouping dictionary data from a list and storing in another dictionary
This way it can be done.
data =  [{ID001: Report-1, ID002: Report-1, ID003: Report-1}, {ID001: Report-2, ID005: Report-5}…..]
d = pd.DataFrame.from_records(data)
res = d.to_dict("list")
print(res)


I am currently working on a big data set where the data is stored into list with dictionaries (format shown below)
List = [{ID001: Report-1, ID002: Report-1, ID003: Report-1}, {ID001: Report-2, ID005: Report-5}…..]

I am trying to group and print a list with one dictionary that contains all ID’s from all dictionaries in the above list with related values (in this case report-1, report-2…)
result_List = {ID001: [Report-1, Report-2, Report-5], ID002: [Report-3, Report-6, Report-23]}

I thought of using for loop, but once the first dictionary is done looping through all the other dictionaries in list, it has to store unique ID’s in the result_List.
The code itself contains lot of loops, which I believe too complex for a list of 200 dictionaries with data.
I am looking for something with Pandas or Numpy with relatively less complex. Can anyone suggest the best way to do this kind of data crunch?
