I have the list
[[(1, 1, {(58091,)}, ('roma',))], [(11, 11, {(97042,)}, ('lecco',))], [(3, 3, {(97068,)}, ('pescate',))]]
I would like to save data in 4 columns as following
id one id two id place
1 1 58091 roma
11 11 97042 lecco
3 3 97068 pescate
what I did
your_list = [[(1, 1, {(58091,)}, ('roma',))], [(11, 11, {(97042,)}, ('lecco',))], [(3, 3, {(97068,)}, ('pescate',))]]
df = DataFrame (your_list,columns=['id one','id two','id','place'])
but it is not working I believe it is due to the brackets but I do not know how to deal with them
{(58091,)}, ('roma',)), why are there extra,when there is no other value?your_list) is of proper format before turning it into apd.DataFrame.