efinance
efinance copied to clipboard
获取全市场基金数据会失败
代码:
all_funds_df = ef.fund.get_fund_codes()
all_funds_index = all_funds_df['基金代码'].apply(str).tolist()
funds_base = ef.fund.get_base_info(all_funds_index)
会报错:
Processing => 217001: 0%| | 57/15437 [00:01<10:57, 23.39it/s]Traceback (most recent call last):
File "/Users/q/Documents/ws/scan/test/funds.py", line 112, in
MAC和win都不行,大佬看看,怎么获取全市场基金数据?
参考这里限制一下线程数目:https://github.com/Micro-sheep/efinance/issues/50
或者不要一下子跑这么多只基金的,可以把基金代码列表切割成多个小部分再跑。