If you want to work with files that are stored in your Google Drive with Colab Notebook, you will need to mount the drive with Colab.
In order to mount drive you will need to make use of the drive module from the goole.colab package.
Simply copy and paste the below 2 lines of python code in your Colab Notebook Code Cell and execute it.
Once you run the cell, you will see a message like below to get permit for the notebook to access your Google Drive files.
from google.colab import drive
drive.mount('/content/drive')

Once you click on "Connect to Google Drive" you will be asked to authorize certain permissions to Colab by login with your Gmail credentials.
Once done, when you click on the file icon on the left sidebar of the Colab Notebook, you should be able to see the Google drive files and folders under drive -> MyDrive.

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!