I'm trying to get the aggregation of 2 different lists, where each element is a dictionary with 2 entries, month and value.

So the first list looks like this:

```
[{
    'patient_notes': 5,
    'month': datetime.date(2017, 1, 1)
}, {
    'patient_notes': 5,
    'month': datetime.date(2017, 2, 1)
}, {
    'patient_notes': 5,
    'month': datetime.date(2017, 5, 1)
}, {
    'patient_notes': 5,
    'month': datetime.date(2017, 7, 1)
}, {
    'patient_notes': 5,
    'month': datetime.date(2017, 8, 1)
}, {
    'patient_notes': 5,
    'month': datetime.date(2017, 12, 1)
}]

```

Second list is:

```
[{
    'employee_notes': 4,
    'month': datetime.date(2017, 2, 1)
}, {
    'employee_notes': 4,
    'month': datetime.date(2017, 3, 1)
}, {
    'employee_notes': 4,
    'month': datetime.date(2017, 4, 1)
}, {
    'employee_notes': 4,
    'month': datetime.date(2017, 8, 1)
}, {
    'employee_notes': 4,
    'month': datetime.date(2017, 9, 1)
}, {
    'employee_notes': 4,
    'month': datetime.date(2017, 10, 1)
},  {
    'employee_notes': 4,
    'month': datetime.date(2017, 12, 1)
}]

```

So I need to build a new list that contains the sum of both list per month, something like this:

```
[{
    'total_messages': 14,
    'month': '2017-01-01'
}, {
    'total_messages': 14,
    'month': '2017-02-01'
}, {
    'total_messages': 14,
    'month': '2017-03-01'
}, {
    'total_messages': 14,
    'month': '2017-04-01'
}, {
    'total_messages': 14,
    'month': '2017-05-01'
}, {
    'total_messages': 14,
    'month': '2017-06-01'
}, {
    'total_messages': 14,
    'month': '2017-07-01'
}, {
    'total_messages': 14,
    'month': '2017-08-01'
}, {
    'total_messages': 14,
    'month': '2017-09-01'
}, {
    'total_messages': 14,
    'month': '2017-10-01'
}, {
    'total_messages': 14,
    'month': '2017-11-01'
}, {
    'total_messages': 14,
    'month': '2017-12-01'
}]

```

I first tried with zip but this only works if first 2 list are equal size. Then I tried with [itertools.izip\_longest] but this has problems if lists are equal size but different months...I cannot simply aggregate those...I need to aggregate matching months only

Counter also is great for this, but I cannot change the keys names of original lists...any ideas?