执行
df3 = ts.get_k_data(code='600519',start='2007-01-01') print(df3)
报错如下:
Traceback (most recent call last):
File "E:\study\git\pythons\test\test_basic_grama\panda_test\test_panda.py", line 29, in <module>
df3 = ts.get_k_data(code='600519',start='2007-01-01')
File "D:\python\lib\site-packages\tushare\stock\trading.py", line 706, in get_k_data
data = data.append([data,_get_k_data(url, dataflag,
File "D:\python\lib\site-packages\pandas\core\generic.py", line 6293, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'append'
经过查找 trading.py
有一个带下划线的apend 方法
于是修改为带下划线的append方法 执行成功