问题描述
我正在尝试使用 XBBG 包通过 python 提取数据(也安装了 blpapi),但出现以下错误,有人知道吗?
import pandas as pd
from xbbg import blp
test = blp.bdp('AAPL US Equity','PX LAST')
回溯(最近一次调用最后一次):
File "<ipython-input-13-c08bdfa0831c>",line 3,in <module>
test = blp.bdp('AAPL US Equity','PX LAST')
File "C:\ProgramData\Anaconda3\lib\site-packages\xbbg\blp.py",line 61,in bdp
.set_index(['ticker','field'])
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\frame.py",line 4446,in set_index
copy=copy,File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\indexes\base.py",line 5704,in ensure_index_from_sequences
index = pd.Index([0,0])
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\indexes\multi.py",line 429,in from_arrays
--------
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\util\_decorators.py",line 208,in wrapper
Convert the allow_args argument (either string or integer) of
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\indexes\multi.py",line 260,in __new__
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\indexes\multi.py",line 801,in _set_codes
(2,"one"),File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\indexes\multi.py",in <genexpr>
(2,File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\indexes\frozen.py",line 189,in _ensure_frozen
NameError: name 'coerce_indexer_dtype' is not defined
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)