I have a string column in the format \
ID Month
1 Jan;Feb
2 Mar;Apr;Jun;Jul;Aug;Nov
3 Jan;May;Oct;Dec
4 Apr;May;Sep;Oct
I want to create unique/distinct 12 columns separated for each month like \
ID | M_1 | M_2 | M_3 | M_4 | M_5 | M_6 | M_7 | M_8 | M_9 | M_10 | M_11 | M_12
1 | Jan | Feb | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA
2 | NA | NA | Mar | Apr | NA | Jun | Jul | Aug | NA | NA | Nov | NA
3 | Jan | NA | NA | NA | May | NA | NA | NA | NA | Oct | NA | Dec
4 | NA | NA | NA | Apr | May | NA | NA | NA | Sep | Oct | NA | NA
Would appreciate if someone can tell me to do the same in Python too.
(Apologies for the bad formatting)