magic function to show plots

PHOTO EMBED

Tue Jun 22 2021 08:36:12 GMT+0000 (UTC)

Saved by @CaoimhedeFrein

%matplotlib inline
content_copyCOPY

I think matplotlib wants to open plots in new windows by default, but it can't do this in Jupyter Notebook. That code is a "magic function" i.e. a specific Jupyter Notebook thing - telling it to plot it in line instead. Save that code too and just run it in the same cell you import pandas, numpy etc. I always run it as standard in every notebook with the imports