本人刚刚接触python 试着跟教程画一个k线图。报错:AttributeError: 'DataFrame' object has no attribute 'DatetimeIndex'
求各位老师帮我看看如何解决
本人刚刚接触python 试着跟教程画一个k线图。报错:AttributeError: 'DataFrame' object has no attribute 'DatetimeIndex'
求各位老师帮我看看如何解决
DatetimeIndex只是dataframe的index的一个类型,类似还有DateTimeIndex, PeriodIndex 和TimedeltaIndex。尝试使用df.index或者是用index的标签名。