[英]How do I generate a candlestick chart from Morningstar data using matplotlib and mpl_finance?
[英]How to fix mpl_finance package for MatPlotLib?
收到此錯誤消息:
MatplotlibDeprecationWarning: The finance module has been deprecated in mpl 2.0 and will be removed in mpl 2.2. Please use the module mpl_finance instead.
我該如何放置mpl_finance
包。 我已將其安裝在 pip 中,但正確的導入用語是什么?
import datetime as dt
import matplotlib.pyplot as plt
from matplotlib import style
from matplotlib.finance import candlestick_ohlc
import matplotlib.dates as mdates
import pandas as pd
import pandas_datareader.data as web
from googlefinance import getQuotes
import json
from datetime import datetime
from forex_python.converter import CurrencyRates
from yahoo_finance import Share
要導入通過 pip 安裝的名為x
的模塊,您通常希望執行import x
。
所以在這里
import mpl_finance
或獲得其功能之一,例如
from mpl_finance import candlestick_ohlc
新版本可以在這里找到: https : //pypi.org/project/mplfinance/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.