请在type( df1['Date'])
为班级pandas.core.series.Series
且df1 ['日期'] [0]为浮点数时出现以下错误,请提供任何帮助:
AttributeError: 'int' object has no attribute 'toordinal'
for i in range(2266,df1.shape[0],1):
performance[i]=performance[i-1]*(1+r[i])
df1['performance']=performance
print(performance[2267])
plt.plot(df1['Date'][2265:4616],df1['performance'][2265:4616])