Technical Articles

Accessing google drive data in google colab!!

39.2KViews

[Hey Friends!!

Today, we will show you all  how to access data from google drive to google colab in 7 easy steps. Colab notebooks allow you to combine executable code and rich text in a single document, along with images, HTML, LaTeX and many more. Now lets it understand what is the benefit of doing this? the answer is : you don’t need to store in your local device as it use server less cloud system so we can do it as fast as possible. Lets see the process step wise.

Step 1 :- Write code in google colab

from google.colab import drive

drive.mount(‘/content/gdrive’)

Step 2 :- click on the browser link and see the screen Look like this . select your Gmail account which stores your data.

Step 3 :- click on sign-in button

Step 4 :- copy this type of code and paste it on the google colab authorization box and enter

now, you can see like this:

Step 5 :- Click on copy path:

Step 6 :- write this code and enter :- ctrl + enter

import pandas as pd

data = pd.read_csv(‘/content/gdrive/MyDrive/data/Big data mini project/10/covid_19_india.csv’)

Step 7 :- write code :-

data.head() and press  ctrl + enter & you will get output :- first 5 line of the csv data file as shown below:

Written By:

Smit R Patel – 19162121031 , 5th BDA

[Image Source: https://www.analyticsvidhya.com/blog/2020/03/google-colab-machine-learning-deep-learning/]

ictblog
the authorictblog