Suppose we have:
df1=
col1 col2 col3
[a,b] [c,d] 0.5
[e,f] [g,h] 0.7
want to return a new df2 based on df1:
df2=
col1 col2 col3
a c 0.5
a d 0.5
b c 0.5
b d 0.5
e g 0.7
e h 0.7
f g 0.7
f h 0.7
Basically, need to show all combination between the lists in df1's col1 and col2, the length of lists may be larger than 2.
Thanks for your help!