I have a dataframe that looks like the below:
| Day | Hour | Count
|--------|-------|--------
0| Monday | 01 | 10
1| Monday | 03 | 2
2| Monday | 04 | 6
3| Monday | 07 | 8
4| Monday | 08 | 3
5| Tuesday| 01 | 7
6| Tuesday| 02 | 6
7| Tuesday| 04 | 2
8| Tuesday| 07 | 8
9| Tuesday| 08 | 5
I would like to transform it into the below:
| Day | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 |
|--------|------|------|------|------|------|------|------|------|
0| Monday | 10 | NaN | 2 | 6 | NaN | NaN | 8 | 3 |
1| Tuesday| 7 | 6 | NaN | 2 | NaN | NaN | 8 | 5 |
I'm not sure if there is a term for this. However, I have been struggling and would appreciate some help.
Thanks so much!