group list of dictionary
Use collections.defaultdict to &quot;bucketize&quot; the items in your list. Then collect the buckets to get the desired result.
from collections import defaultdict

bucket = defaultdict(list)

for record in lst:
    bucket[record['name']].append(record)
    
lst_new = list(bucket.values())