I have a data frame like this,
ID Hour Prob Rank
123 10 0.4 4
123 11 0.6 3
123 12 1.0 1
123 13 0.9 2
456 10 0.8 1
456 11 0.5 2
456 12 0.1 4
456 13 0.2 3
I am trying to create a data frame based on this which should like this,
ID Rank_1 Rank_2 Rank_3 Rank_4 Prob_1 Prob_2 Prob_3 Prob_4
123 12 13 11 10 1.0 0.9 0.6 0.4
456 10 11 13 12 0.8 0.5 0.2 0.1
I am not very familiar with pandas like tidyverse in R. Any help is highly appreciated. Thanks in advance.