How to import a folder in Jupyter Notebook

0 votes

Hi Guys,

I am new to Jupyter Notebook IDE. I want to import some folder in my Jupyter Notebook. How can I do that?

Aug 16, 2020 in Python by akhtar
• 38,170 points
5,951 views

1 answer to this question.

0 votes

Hi@akhtar,

There is no simple way to import python files in another directory. This is unrelated to the jupyter notebook. You can add the directory containing the file you wish to import to your path and then import the file as shown below.

import sys  
sys.path.insert(0, '/path/to/application/app/folder')
import file
answered Aug 16, 2020 by MD
• 95,160 points

Related Questions In Python

0 votes
1 answer

I want to download a file from the website by web scraping. Can anyone explain how to do this in jupyter lab (python) with an example?

Hey, Web scraping is a technique to automatically ...READ MORE

answered Apr 7, 2020 in Python by Gitika
• 65,870 points
663 views
0 votes
1 answer

How to get the latest file in a folder using python?

Hello @kartik,  would suggest using glob.iglob() instead of the glob.glob(), as ...READ MORE

answered May 27, 2020 in Python by Niroj
• 82,720 points
5,799 views
0 votes
0 answers

i want to ask that how can i run one file of python in another file in jupyter notebook

motion_detection.ipynb # Python program to implement # Webcam ...READ MORE

Dec 15, 2020 in Python by Ramsha
• 120 points
113 views
0 votes
1 answer

How to hide a window in the constructor immediately after creation?

You can use QtCore.QTimer class Example(QWidget):     def __init__(self, app):         QWidget.__init__(self)         QTimer.singleShot(0, ...READ MORE

answered Apr 17, 2018 in Python by anonymous
169 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,032 views
0 votes
0 answers
0 votes
1 answer

Error executing Jupyter command 'notebook': [Errno 2] No such file or directory

Hi@akhtar, I think there is a problem with ...READ MORE

answered Jun 25, 2020 in Python by MD
• 95,160 points
1,340 views
0 votes
1 answer

How to load Numpy array in Jupyter Notebook?

Hi@akhtar, You can use numpy.load() function to load ...READ MORE

answered Jun 22, 2020 in Python by MD
• 95,160 points
1,676 views
0 votes
1 answer

How to load python script in Jupyter Notebook?

Hi@akhtar, Starting from IPython 3 (now Jupyter project), ...READ MORE

answered Aug 16, 2020 in Python by MD
• 95,160 points
3,584 views