I have a data frame that looks like the following:
Day | Minutes | Status |
---|---|---|
1 | 0 | Play |
1 | 10 | Eat |
1 | 30 | Move |
1 | 50 | Transport |
2 | 0 | Play |
2 | 20 | Transport |
2 | 50 | Sleep |
Is it possible to pivot the table to have my Day as an index while the column names are the status and the values are the minutes?
Desired Output:
Day | Play | Eat | Move | Transport | Play | Transport | Sleep |
---|---|---|---|---|---|---|---|
1 | |||||||
2 |