簡體   English   中英

python中的mpl_finance模塊導入錯誤

[英]mpl_finance module import error in python

我嘗試from matplotlib.finance import quotes_historical_yahoo_ochl使用from matplotlib.finance import quotes_historical_yahoo_ochl但發現它已被棄用。 因此,我安裝了mpl_finance並嘗試了以下操作:

from mpl_finance import quotes_historical_yahoo_ochl

但我收到以下錯誤:

ImportError: cannot import name 'quotes_historical_yahoo_ochl'

我想檢查一下:

dir(mpl_finance)

並發現以下內容:

['Affine2D', 'Line2D', 'LineCollection', 'PolyCollection', 'Rectangle', 'TICKLEFT', 'TICKRIGHT', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_candlestick', '_check_input', '_plot_day_summary', 'absolute_import', 'candlestick2_ochl', 'candlestick2_ohlc', 'candlestick_ochl', 'candlestick_ohlc', 'division', 'index_bar', 'mcolors', 'np', 'plot_day_summary2_ochl', 'plot_day_summary2_ohlc', 'plot_day_summary_oclh', 'plot_day_summary_ohlc', 'print_function', 'unicode_literals', 'volume_overlay', 'volume_overlay2', 'volume_overlay3', 'xrange', 'zip']

請幫助我擺脫這個問題。 請。

由於yahoo停止提供其歷史報價服務,因此quotes_historical_yahoo_ochl函數停止工作。 因此,已將其mpl_finance代碼中完全刪除

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM