DEV Community

Cover image for Mounting Google Drive in Google Colab
Pranesh Chowdhury for Pranesh CodeCraft

Posted on

2 1 1

Mounting Google Drive in Google Colab

Connect Google Drive to Google Colab.

Follow these steps:

  1. First, upload the CSV file to Google Drive.
  2. Open a Colab notebook and write the code.
  3. Connect to Google Drive by granting access to your Google account.
  4. Find the file in Google Drive, copy its path, and paste it into the code.

Run this code:

This code will be automatically generated when you mount the drive. You just need to run this code.

from google.colab import drive

drive.mount('/content/drive')
Enter fullscreen mode Exit fullscreen mode

Access file:

df = pd.read_csv("paste the google drive path")
Enter fullscreen mode Exit fullscreen mode

~ Thank You 🩵⭐

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay