How to execute a * .PY file from a * .IPYNB file on the Jupyter notebook?
In the %run magic documentation you can find: -i run the file in IPython’s namespace instead of an empty one. This is useful if you are experimenting with code written in a text editor which depends on variables defined interactively. Therefore, supplying -i does the trick: %run -i ‘script.py’ The “correct” way to do it … Read more