I have a python dataframe with a few columns, let's say that it looks like this:
| Heading 1 | Values |
|---|---|
| A | 1 |
| A | 2 |
| B | 9 |
| B | 8 |
| B | 6 |
What I want to is to "pivot" or group the table so it would look something like:
| Heading 1 | Value 1 | Value 2 | Value 3 |
|---|---|---|---|
| A | 1 | 2 | |
| B | 9 | 8 | 6 |
I was trying to group the table or pivot/unpivot it by several ways, but i cannot figure out how to do it properly.