```py
arr = [{'red': {'weight': 50}}, {'blue': {'weight': 60}}, {'red': {'weight': 70}}]

```

Let's say we want to summarize this array with the following expected output:

```py
output = [{'color': 'red', 'count': 2, 'total': 120, 'min': 50, 'max': 70, 'mean': 60},
          {'color': 'blue', 'count': 1, 'total': 60, 'min': 60, 'max': 60, 'mean': 60}]

```

Or alternatively:

```py
output = {'red':{'count': 2, 'total': 120, 'min': 50, 'max': 70, 'mean': 60},
          'blue':{'count': 1, 'total': 60, 'min': 60, 'max': 60, 'mean': 60}}

```

What I have tried:

```py
>>> {list(i.items())[0][0]:[list(j.items())[0][0] for j in arr].count(list(i.items())[0][0]) for i in arr}
{'red': 2, 'blue': 1}

```

```py
>>> [{list(i.items())[0][0]:{'count': [list(j.items())[0][0] for j in arr].count(list(i.items())[0][0])} for i in arr}]
[{'red': {'count': 2}, 'blue': {'count': 1}}]

```

```py
>>> [{'color': list(i.items())[0][0],'count': [list(j.items())[0][0] for j in arr].count(list(i.items())[0][0])} for i in arr]
[{'color': 'red', 'count': 2}, {'color': 'blue', 'count': 1}, {'color': 'red', 'count': 2}]

```