我正在尝试通过其API从雅虎财经导入股票信息。我尝试了 get_quote_table 但它说: AttributeError: 'DataFrame' 对象没有属性 'append'。您的意思是:“_append”吗? 有谁知道是什么问题? 我更新了我的 pandas 并检查了我的 python 版本
导入 yahoo_fin.stock_info 作为 si 将 pandas 导入为 pd
quote = si.get_quote_table('AAPL')
yahoo-fin
软件包的
最后更新是2021年7月10日,因此它与较新版本的Pandas不兼容。如果你确实需要使用这个库,请将你的 Pandas 版本降级到 1.5.3:
[...]$ pip install "pandas<2"