I have the following Pandas dataframe.
timestamp label value
1 a 1
2 b 2
3 a 5
4 b 0
5 c 3
Is there a way to convert the values of the label column into columns and keep the last used data as values? It does not matter if I assign Null or 0 in the missing values that have not appeared yet.
timestamp a b c
1 1 Null Null
2 1 2 Null
3 5 2 Null
4 5 0 Null
5 5 0 3