I have a dataframe, and I want to create 5 columns from a list in one of the column
Example :
df :
ID Data
1 ['A1','A2','A3','A4','A5']
2 ['A2','A3','A4','A5']
Note that here few list are having less than 5 columns , for those columns insert NAN in that place.
Output df:
ID Col1 Col2 Col3 Col4 Col5 Data
1 A1 A2 A3 A4 A5 ['A1','A2','A3','A4','A5']
2 A2 A3 A4 A5 Nan ['A2','A3','A4','A5']