Reputation: 315
So I'm trying to make a series of educational coding using jupyter. I wanted to create segmented parts by parts for exp. part1.ipynb, part2.ipynb, and so forth.
so when i use
from partuno import *
It returns an error and does not read the previous part even though they share the same folder location in jupyter. My question is are there any other way for me to import them into the next part?
Upvotes: 4
Views: 3785
Reputation: 2519
pip install import-ipynb
import import_ipynb
import mypage
#import mypage.ipynb
a = mypage.test1()
print(a)
Upvotes: 0
Reputation: 563
pip import_ipynb
import your file at jupyter notebook.
import my_math.ipynb
file at test.ipynb
.
Upvotes: 2
Reputation: 21
You need to use the "import_ipynb" library of python. if you want to use the contents of one.pynb in two.pynb then
import import_ipynb
import one.pynb
now you can use the functions defined in one.pynb in you two.pynb
Upvotes: 2