1

When I run the code with the plot() function, I can't see the output graph? How can I fix this? Maybe the problem is "plotly" but I don'understand exactly

pd.options.plotting.backend = "plotly"
url =  "https://raw.githubusercontent.com/fzumstein/python-for-excel/1st-edition/csv/MSFT.csv"
msft = pd.read_csv(url , index_col = "Date" , parse_dates = ["Date"])
msft.head()
msft.loc["2019-06":"2020-05" , "Adj Close"].plot()

Jupyter Notebook

  • 1
    Does this answer your question? [How to make IPython notebook matplotlib plot inline](https://stackoverflow.com/questions/19410042/how-to-make-ipython-notebook-matplotlib-plot-inline) – G. Anderson Apr 29 '21 at 16:34

1 Answers1

0

The image you provided is showing that you are actually using pandas plotting. As msft is dataframe in your case and your are plotting some of its columns directly. Try,

%matplotlib inline

before plotting and it will work

Avicii
  • 19
  • 4