I'm learning data science and a beginner. I am struggling with the below Pandas problem for some time now . Below is the problem description . Please help.
I have the following column of lists in my Data Frame
Time
0 [34, 50]
1 []
2 [4, 3, 7]
3 [13]
4 [10, 12]
I need to expand this series of lists and create a new DataFrame, and I need each first value in its own column, each second value in its own column, and so on. If there isn't an Nth value, the value should be NaN.
Output should be a new DataFrame as below :
t1 t2 t3
0 34 50 nan
1 nan nan nan
2 4 3 7
3 13 nan nan
4 10 12 nan
Thanks,