我正在尝试从字典创建一个Dataframe:
frio = {'Frio11' : frioMurteira11.FrioAcum, 'Frio12' : frioMurteira12.FrioAcum,\
'Frio13' : frioMurteira13.FrioAcum}
并创建一个用作索引的范围
rng = pd.date_range('1/11/2011', periods=107, freq ='D')
然后,当我尝试创建DataFrame
时DataFrame(frio, index=rng)
我收到以下错误
ValueError: Shape of passed values is (3,), indices imply (3, 107)
你可以帮帮我吗?
谢谢
答案 0 :(得分:2)
import pandas as pd
pd.DataFrame(frio, index=rng)