I have a dataframe where one column shows hour type and another shows number of hours, but I want it to be a dataframe where each hour type has its own column.
Like from this:
name hourtype hours
Amy A 3
Amy B 2
Bob B 1
Bob C 4
Cam A 5
Cam B 1
Cam C 1
Dan A 2
To this:
name A B C
Amy 3 2 0
Bob 0 1 4
Cam 5 1 1
Dan 2 0 0