1
我的字典裏是這樣轉換嵌套的字典到數據幀
mydict =
{240594.0: {1322.0: 1.6899999999999999, 1323.0: 1.6900000000000002, 1324.0: 1.6899999999999999, 1325.0: 1.6899999999999999, 1326.0: 1.6899999999999999, 1327.0: 1.6900000000000002, 1328.0: 1.6899999999999999, 1329.0: 1.6899999999999999, 1356.0: 1.6900000000000002, 1357.0: 1.6900000000000002, 1358.0: 1.6899999999999999, 1359.0: 1.6900000000000002, 1360.0: 1.6900000000000002, ...},
226918.0: {1322.0: 1.6900000000000002, 1323.0: 1.6899999999999999, 1324.0: 1.6900000000000002, 1325.0: 1.6899999999999999, 1326.0: 1.6900000000000002, 1327.0: 1.6899999999999999, 1328.0: 1.6900000000000002, 1329.0: 1.6899999999999999, 1352.0: 1.6900000000000002, 1353.0: 1.6900000000000002, 1354.0: 1.6899999999999999 ...}}
這是{iri_key: {week:price, week:price ...}, iri_key: {...}}
真正的價值,我想這本詞典轉換成數據幀,它看起來像
week week week ...
irikey: price price price ...
irikey: ... ... ...
在上述情況下
1322.0 ...
240594.0 1.6899999999999999 ...
226918.0 1.6900000000000002 ...
我該怎麼做?
你知道「周」的範圍嗎? – locoyou
是從1322到1373 – JonghoKim
但它們中的一些缺少值因此維度不匹配。仍然最大周是1373和最小值是1322 – JonghoKim