import pandas as pd
input_thing = [
[{'foo': 1, 'bar': 'a', }],
[{'foo': 2, 'bar': 'b', }],
]
print(input_thing)
How can I get a nice pandas dataframe out of the data displayed above?
I.e. that the columns foo and bar are nicely displayed on the outside
pd.DataFrame(input_thing)
Only will generate a dataframe with a single column 0
The desired output would be:
pd.concat([
pd.DataFrame(input_thing[0]),
pd.DataFrame(input_thing[1])
])