I need to reshape a single column table with the next format:
| Year | foo | bar | baz |
|---|---|---|---|
| 1999 | 10 | 30 | 20 |
to the format:
| Category | value |
|-----|-------|
| foo | 10 |
| bar | 30 |
| baz | 20 |
I kinda know how to use pandas pivot and pandas melt, but for some reason, it's not working with my table. I made the table extracting a single row from a bigger one containing more years.