最佳答案
如何将字典列表转换为DataFrame
?给定:
[{'points': 50, 'time': '5:00', 'year': 2010},{'points': 25, 'time': '6:00', 'month': "february"},{'points':90, 'time': '9:00', 'month': 'january'},{'points_h1':20, 'month': 'june'}]
我想把上面的变成一个DataFrame
:
month points points_h1 time year0 NaN 50 NaN 5:00 20101 february 25 NaN 6:00 NaN2 january 90 NaN 9:00 NaN3 june NaN 20 NaN NaN
注意:列的顺序无关紧要。