With Python I can reuse another Jupyter notebook by importing it directly to a new one as a module (here in Anaconda) or using nbpackage.
Can this be done with Julia Jupyter notebooks? How to import functions from one notebook into another?
After installing the necessary packages for your purposes, you can experience the high-performance Julia language in Jupyter notebook.
SCRIPTDIR in Julia to find out where Conda installed jupyter . A "dashboard" window like this should open in your web browser. Click on the New button and choose the Julia option to start a new "notebook". A notebook will combine code, computed results, formatted text, and images, just as in IPython.
The solution is to use NBInclude.jl package:
using NBInclude
@nbinclude("my_other_jupyter_notebook.ipynb")
This construct is analogous to having the code from notebook stored in a some.jl file and included as typical:
include("some.jl")
Please note that there are different scoping considerations at play depending on the version of Julia you use (1.0 or 0.6). Please refer to the documentation.
Installation via:
using Pkg
Pkg.add("NBInclude")
or REPL / ] (package management mode):
add NBInclude
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With