I have a dataframe that looks like this:
| A | type | val |
|---|---|---|
| first | B | 20 |
| second | B | 30 |
| first | C | 200 |
| second | C | 300 |
I need to get it to look like this:
| A | B | C |
|---|---|---|
| first | 20 | 200 |
| second | 30 | 300 |
How do I do this using Pandas? I tried using transpose, but couldn't get it to this exact table.