對於下面的代碼屬性錯誤:模塊對象有沒有屬性「to_date_time」
import quandl
import pandas as pd
api_key = open('quandlapikey.txt','r').read()
df = quandl.get('FMAC/HPI_AK',authtoken=api_key)
print(df.head())
我收到此錯誤:
File "/usr/local/lib/python2.7/dist-packages/Quandl-3.1.0-py2.7.egg/quandl/get.py", line 63, in get return data.to_pandas() File "/usr/local/lib/python2.7/dist-packages/Quandl-3.1.0-py2.7.egg/quandl/model/data_mixin.py", line 20, in to_pandas df[self.column_names[0]] = df[self.column_names[0]].apply(pd.to_datetime) AttributeError: 'module' object has no attribute 'to_datetime'
它顯示:蟒蛇,大熊貓已經是最新版本。 –
它顯示了什麼版本?你可以使用'pd .__ version__'來檢查它。 –
哦!它顯示0.7.0 –