Google Colab - Importing Python Scripts as Modules!

preview_player
Показать описание
Brief tutorial on how to import a Python script as a module within Google Colab. When importing a file from Google drive, be sure that the notebook within Colab is connected to the drive.

The notebook can be found in the "Google Colab Tutorials" folder within the below repo.

CONNECT:

|-Video Chapters-|
0:00 - Intro
0:07 - Creating a Python script to import
0:54 - Method 1: Importing a script from Google Drive
2:43 - Method 2: Importing a script from your local computer
Рекомендации по теме
Комментарии
Автор

as a newbie in python code, i feel really grateful your work. This first step took me a night.

khanhduyphan
Автор

I never feel the need to comment because I think a like and a subscribe is enough. But man, Thank you for your page and the time you have put towards the videos. I just took a look through the "All about Python" playlist and I'm speechless. I hope your profile continues to grow by the day! Blessings!

PAINTBALLA
Автор

Straight and to the point. Excellent tutorial.

dario
Автор

best python video in this topic I have seen

shifanasrin
Автор

Thankyouuuu, now I can finish my assignment na😊

LerraJ.
Автор

Thank you! Super clear and useful explanation!

albertosorianogomez
Автор

Thank you very much! Have an amazing day!

santiagoarango
Автор

Sir, simple and powerful, thank you some much for making this video .

anilnaveendavid
Автор

Very Helpful and to the point. Thankyou!

aadilzikre
Автор

Thank you so much! Your video is so easy to follow and you helped me a lot on my school activity! Do take care!!!

tsi.
Автор

The first method is working well for me. Thank you very much

BlinkDrive
Автор

Many thanks bro, your video help me a lot.

vohiepthanh
Автор

Amazing your video. Thank you so much!

LearningWorldChatGPT
Автор

Muchas gracias. Thanks you genius....!! Simple y rápido...

gatoro
Автор

I am having major issues with calling a function from a script in a sub-folder.
Does anyone know how to accomplish this simple task in Colab?

For example, I need the "Preprocessor" function from the "preprocessing.py" file inside the "util" directory:

from util.preprocessing import Preprocessor

It does not seem to be that simple??

Antz_
Автор

say i have a folder named "utils" in google drive. In this folder i have several .py files -- i want to call "from utils import ___.py" -- this does not work with the methods you mentioned. any help please?

EmphaticTrain
Автор

i have .py file module, there are many files in the folder and i have uploaded that folder in gdrive and firstly i have mounted the gdrive in collab but while importing particular folder i getting no module found error.
so how to deal with it??

Автор

I want to use config python script declared variable in user define function parameter like fun_name(config.val_path) in google colab notebook.

ashwinkumar
Автор

is there an difference between module and package because i have __init__.py in module?

Автор

Hi Adrian,
How can I use a function that I've created in another.ipynb in my current.ipynb in Colab?
I have mounted my gdrive into current ipynb. Can you suggest next steps.

RajaGopal_Tangella