A slight variant to this question: Pandas split column of lists into multiple columns
Given a dataframe:
col1
[0, 1, 2]
[0, 1]
[0, 1, 2, 3, 4, 5, 6]
[0, 1, 2, 3]
How can I convert this into a dataframe with columns equal to the maximum length?
col1 col2 col3 col4 col5 col6 col7
0 1 2
0 1
0 1 2 3 4 5 6
0 1 2 3