Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to import a function in another file

In python it's easy to find how can I do:

from file import func1, func2, func3

But I couldn't do in jupyter notebook. It didn't read the file.

Thanks for advance.

how to import a function in another file

In python it's easy to find how can I do:

from file import func1, func2, func3

But I couldn't do in jupyter notebook. It didn't read the file.

For example dag is an function in sample_code ;

import ipynb from ipynb.fs.full.sample_code import dag


ModuleNotFoundError Traceback (most recent call last) <ipython-input-3-cb32ddc8df9f> in <module> ----> 1 import ipynb 2 from ipynb.fs.full.sample_code import dag

ModuleNotFoundError: No module named 'ipynb'

Thanks for advance. advance.

how to import a function in another file

In python it's easy to find how can I do:

from file import func1, func2, func3

But I couldn't do in jupyter notebook. It didn't read the file.

For example dag is an function in sample_code ;

import ipynb ipynb

from ipynb.fs.full.sample_code import dag


ModuleNotFoundError Traceback (most recent call last) <ipython-input-3-cb32ddc8df9f> in <module> ----> 1 import ipynb 2 from ipynb.fs.full.sample_code import dag

ModuleNotFoundError: No module named 'ipynb'

Thanks for advance.