Load Python File In Jupyter Notebook

[Solved] Load Python File In Jupyter Notebook | Julia - Code Explorer | yomemimo.com
Question : load python file in jupyter notebook

Answered by : calm-crocodile-lmta4vt4rhuy

A text file can be loaded in a notebook cell with the magic command %load.
If you execute a cell containing:
%load filename.py
the content of filename.py will be loaded in the next cell. You can edit and execute it as usual.
To save the cell content back into a file add the cell-magic %%writefile filename.py at the beginning of the cell and run it. Beware that if a file with the same name already exists it will be silently overwritten.

Source : http://stackoverflow.com | Last Update : Wed, 16 Dec 20

Answers related to load python file in jupyter notebook

Code Explorer Popular Question For Julia