我有一个像这样的 json 文件:
dict = {'2020-04-13TVL 0620M-Su 6p-12m': {'syscode': '0620',
'weekStartDate': '2020-04-13'},
'2020-04-20HSTE0620M-Su 6p-12m': {'syscode': '0620',
'weekStartDate': '2020-04-20'},
'2020-06-15MTV 6032M-Su 12m-2a': {'syscode': '6032',
'weekStartDate': '2020-06-15'},
'2020-06-15VH1 1572M-Su 12m-2a': {'syscode': '1572',
'weekStartDate': '2020-06-15'}}
如何避免字典的顶级键,以便我可以获得如下数据框:
dict = [
{'syscode': '0620', 'weekStartDate': '2020-04-13'},
{'syscode': '0620', 'weekStartDate': '2020-04-20'},
{'syscode': '6032', 'weekStartDate': '2020-06-15'},
{'syscode': '1572', 'weekStartDate': '2020-06-15'}
]
df = pd.DataFrame(dict)
df
syscode weekStartDate
0 0620 2020-04-13
1 0620 2020-04-20
2 6032 2020-06-15
3 1572 2020-06-15
慕妹3242003
相关分类