I have two dataframes df1 and df2

```
df1 = pd.DataFrame({'name': ['A', 'B', 'C'],
            'value': [100, 300, 150]})
df2 = pd.DataFrame({'name': ['A', 'B', 'D'],
            'value': [20, 50, 7]})

```

I want to merge these two dataframes to a new dataframe df3 so I get the following result:

[![enter image description here](https://i.stack.imgur.com/ZO00H.png)](https://i.stack.imgur.com/ZO00H.png)

Then I want to have a forth new dataframe df4 where the rows aggregated to sums like

```
df4 = pd.DataFrame({'name': ['A', 'B', 'C',  'D'],
            'value': [120, 350, 150, 7]})

```

How to do this?