Getting this error message:
MatplotlibDeprecationWarning: The finance module has been deprecated in mpl 2.0 and will be removed in mpl 2.2. Please use the modu
new version can be found here: https://pypi.org/project/mplfinance/
To import a module which is installed through pip with the name x
you would mostly want to do import x
.
So, here
import mpl_finance
or to get one of its functions, e.g.
from mpl_finance import candlestick_ohlc
All code for matplotlib.finance moved to a separate repository. Here is an example of usage. To answer your question:
from mpl_finance import candlestick_ohlc