I have 3 columns that I want to convert them into rows under a new column called 'variable' while the values are kept in a new column called 'value'. I tryed using transpose and pivot but I wont get the deisred result.
This is my dataframe:
| | date | speed | meters | pallets |
|---|------------|-------|--------|---------|
| 0 | 2020-03-05 | 300.0 | 1500.0 | 9 |
This is my desired dataframe:
| | date | variable | value |
|---|------------|----------|--------|
| 0 | 2020-03-05 | speed | 300.0 |
| 1 | 2020-03-05 | meters | 1500.0 |
| 2 | 2020-03-05 | pallets | 9 |