我想从 MOEX 下载报价。为此,我使用了
pandas_datareader
。但它给出了一个错误。也许有人知道如何解决这个问题。我附上代码。
import pandas_datareader as pdr
f = pdr.moex.MoexReader('SBER', '2020-07-02', '2020-07-03').read()
错误:
AttributeError Traceback (most recent call last)
<ipython-input-2-18341a39c98f> in <cell line: 1>()
----> 1 f = pdr.moex.MoexReader('SBER', '2020-07-02', '2020-07-03').read()
1 frames
/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py in __getattr__(self, name)
5987 ):
5988 return self[name]
-> 5989 return object.__getattribute__(self, name)
5990
5991 def __setattr__(self, name: str, value) -> None:
AttributeError: 'DataFrame' object has no attribute 'append'
也许这个问题有解决办法?
我查看了文档,但没有找到解决方案。
尝试使用pandas 1.2.5版本。这对我有用。
pip install pandas==1.2.5