如何修复MatPlotLib的mpl_finance包?

sge*_*tim 3 python google-finance matplotlib pandas

收到此错误消息:

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
Run Code Online (Sandbox Code Playgroud)

omd*_*mdv 7

matplotlib.finance的所有代码都移动到一个单独的存储库.这是一个使用示例.回答你的问题:

from mpl_finance import candlestick_ohlc
Run Code Online (Sandbox Code Playgroud)