I
I
Ilya2021-08-11 14:26:06
Python
Ilya, 2021-08-11 14:26:06

How to import data into ipynb?

Good day to all who read this message. The essence of the problem is this: I decided to study importing data and working with modules in Python, but immediately ran into a difficulty: instead of the classic pycharm and .py files, I use Jupyter Notebook (respectively, the .ipynb extension), which rolled over VS Code. How to now import data from one .ipynb file to another .ipynb
PS libraries installed:

pip install import-ipynb
pip install ipynb

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2021-08-12
@bucksbunny

Solution:

import import_ipynb
import functions
from functions import compute_surface
testing = compute_surface(5)
print (testing)
#рабочий способ

also tried this way:
from ipynb.fs.full.functions import compute_surface

and like this:
import nbimporter
from functions import compute_surface
testing = compute_surface(5)
print (testing)
#рабочий способ

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question