如何将 Dictionary 导入 DataFrame,并将第一列指定为日期并指定标题:
db = {u'data': [[u'18/06/2013', u'34.8400', u'34.8400'],
[u'17/06/2013', u'34.4900', u'34.4900']],
u'fund': u'TGC'},
{u'data': [[u'18/06/2013', u'14.9179', u'14.9179'],
[u'17/06/2013', u'14.8712', u'14.8712']],
u'fund': u'FEF'},
{u'data': [[u'18/06/2013', u'6.6780', u'6.6780'],
[u'17/06/2013', u'6.6510', u'6.6570']],
u'fund': u'FAF'}]
如下数据框:
TGC FEF FAF
date bid ask bid ask bid ask
18/06/2013 34.8400 34.8400 14.9179 14.9179 6.6780 6.6780
17/06/2013 34.4900 34.4900 14.8712 14.8712 6.6510 6.6570