从字典列表到数据框

时间:2019-12-17 17:31:59

标签: python dataframe

我有这本字典

dictionary = {'dic':[{'a':'12-02', 'age':'24','users':{'name':'paul','university':'harvard'}},
               {'a':'15-02', 'age':'34'},
               {'a':'13-02', 'age':'39','users':{'name':'carl','university':'yale'}}]
}

我需要创建此数据框:

name    University
paul     harvard
carl      yale

代码参考:

type(dict['dic']) # list
type(dict['dic'][1]) # dictionary

0 个答案:

没有答案