I have following dataframe:
pri sec
TOM AB,CD,EF
JACK XY,YZ
HARRY FG
NICK KY,NY,SD,EF,FR
I need following output with column names as following(based on how many , separated fields exists in column 'sec'):
pri sec sec0 sec1 sec2 sec3 sec4
TOM AB,CD,EF AB CD EF NaN NaN
JACK XY,YZ XY YZ NaN NaN NaN
HARRY FG FG NaN NaN NaN NaN
NICK KY,NY,SD,EF,FR KY NY SD EF ER
Can I get any suggestions?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…