Restructure the df using col values and missing values should be replaced with 0.
my df :
a b c
0 AM 24
1 AM 20
4 AM 3
6 AM 2
0 AY 13
1 AY 16
2 AY 1
4 AY 5
6 AY 2
Desired df:
b 0 1 2 4 6
AM 24 20 0 3 2
Ay 13 16 1 5 2
Thanks!!