Trying to convert a python list to a pandas dataframe:
input:
list = [[a,x,[1,2]],[a,y,[1]],[a,z,[1,2,3]],[b,v,[1]],[b,w,[1,2]]...]
some conversion trickery to result in:
output:
c1 c2 c3
a x 1
a x 2
a y 1
a z 1
a z 2
a z 3
b v 1
b w 1
b w 2
The first and second elements of each list element are always single values (that become c1 and c2), but the third element is a list of varying length. I tried a variety of loops to convert to a list with each element ready as a 'row' but I couldn't make it work. Its kind of like an inverse pivot table but that didn't really help me either. Any help is appreciated