I have a list of lists in python. I am trying to convert it into a dataframe. For eg =
foo = [
[1,2,3...],
[a,b,c...],
[aa,bb,cc...]
]
Each of these 3 lists have 100 elements in them. I have tried the following to convert to a dataframe -
df = pandas.DataFrame(foo, columns=headers) // where headers is ['id', 'fname', 'lname']
df = pandas.DataFrame(foo, columns=[foo[0], foo[1], foo[2]])
However I am getting this error -
AssertionError: 3 columns passed, passed data had 100 columns