Skip to content
Advertisement

Convert List of tuples to dataframe

Having a data as below:

JavaScript

I need to convert this data to data frame. I need the dataframe/output as follows:

COL1 COL2 COL3 COL4
10 L5 [‘abc’] 0
15 L6 [‘bda’, ‘LAS’] 5

Advertisement

Answer

You could use tuple unpacking in a comprehension:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement