My dataframe looks like following:
col1 col2
1 [1,2,3]
2 [1,2]
3 [1]
I want to exapnd the dataframe on the basis of col2
such that the values of other columns gets copied in the new rows as following.
col1 col2
1 1
1 2
1 3
2 1
2 2
3 1
I've scoured prior questions for something to get me started, but no luck. Any help is appreciated.