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')
Permit this notebook to access your Google Drive files?
This notebook is requesting access to your Google Drive files. Granting access to Google Drive will permit code executed in the notebook to modify files in your Google Drive. Make sure to review notebook code prior to allowing this access.
Connect to Google 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.
Facing issues? Have Questions? Post them here! I am happy to answer!
- How to get nest aware on iPhone
- Fetch as Google Crawl Error or Redirected Status
- How to upload and read csv file in Google Colab
- Google Celebrates Rosa Bonheur 200th birthday with a Google Doodle
- Fix: Cannot contact reCAPTCHA. Check your connection and try again.
- Google Webmaster : An error has occurred. Please try again later
- [Fix] reCAPTCHA not working in Web Browser
- Fetch More then 10 Links Per Page in Google Search Result
- How to do a Reverse Image Search Using Google Tools
- Turning Off Chat in Gmail
- How to Mount Google Drive in Colab Notebook
- How to Hum a Song to Google to find it out! [Android and iPhone]
- Google Colab: How to read file from Google Drive
- How to Undo-Revert Sent Email in Google Gmail
- Google Local Guide Program and Perks of Contributing to Google Maps
- How to install Google Chrome using Mac Terminal
- How to Toggle Light/Dark Mode in Google Colab
- How to Upload a File to Google Colab (txt, csv, json, xml, xlsx)
- How to insert image into Google Sheets cell
- Installing Google Cloud macOS SDK
- 86 Gmail keyboard shortcuts that you may find Advantageous
- Google Search Console: HTTPS is invalid and might prevent it from being indexed
- Resolving DNS_PROBE_FINISHED_NXDOMAIN Google Chrome Error
- Enable Dark Mode in Google Search
- Page actions are temporarily disabled [Google Search Console Page Crawling]
- Special character & not working with SharePoint REST API - SharePoint
- Todays Apple Spring Loaded Event Live Updates - Apple
- How to add multiple spaces between html page text - Html
- How to clear ZSH history of commands executed on Mac Terminal - zsh
- How to enable Dark Mode in Windows 11 - Windows-11
- Android is starting optimizing... app 1 of 1 - Android
- [Solved] Error launching studio - Android-Studio
- [fix] Execution failed for task :core:compileJava - Could not find tools.jar - Gradle