Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

open csv from google drive using python

#From 
#Derive the id from the google drive shareable link.
#For the file at hand the link is as below
URL = <Go to Drive --> choose the file --> choose 'Get Link' --> paste it here>
path = 'https://drive.google.com/uc?export=download&id='+URL.split('/')[-2]
df = pd.read_csv(path)
Comment

import csv from google drive python

#Derive the id from the google drive shareable link.
#For the file at hand the link is as below
URL = 'https://drive.google.com/file/d/1m0mAGzpeMR0W-BDL5BtKrs0HOZsPIAbX/view?usp=sharing'
path = 'https://drive.google.com/uc?export=download&id='+URL.split('/')[-2]
#df = pd.read_pickle(path)
df = pd.read_csv(path)
df.head()
Comment

PREVIOUS NEXT
Code Example
Python :: Handling Python DateTime timezone 
Python :: how to use the random module in python 
Python :: how to delete json object using python? 
Python :: numpy sort array by another array 
Python :: creating a virtual environment with django on windows 
Python :: time.sleep() faster 
Python :: calculate age python 
Python :: format list into string python 
Python :: hide code in jupyter notebook 
Python :: get the name of a file using os 
Python :: how to get how many rows is in a dataframe? 
Python :: create and use python classes 
Python :: Python Tkinter SpinBox Widget 
Python :: python delete dict key if exists 
Python :: how can item in list change in int in python 
Python :: python iterate through files in directory 
Python :: python tkinter getting labels 
Python :: dataframe to list pyspark 
Python :: jupyter markdown new line 
Python :: add row in db django 
Python :: download image from url python 3 
Python :: python sort dictionary by key 
Python :: only get top 10 python dataframe 
Python :: python split string every character 
Python :: dictionary with double key python 
Python :: color name to hex python 
Python :: import math sqrt python 
Python :: limit for loop python 
Python :: python string to datetime object 
Python :: roman to integer python 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =