Skip to content
Advertisement

Create a DataFrame from list in lists (Pandas)

I´m having trouble creating a dataframe on my list.

The list contains four columns, but instead it says on presente one column with data:

JavaScript

The list itself is presented in this way:

JavaScript

I know there is something happening due to the double [], but i can´t figure it out. Can´t someone help me?

Here is the code so far:

JavaScript

Advertisement

Answer

you could fix this with a for loop

JavaScript

I’m sure theres a way to do this with zip(), let me experiment and I’ll edit if I find it

Advertisement