google-drive-api

Google spreadsheet to Pandas dataframe via Pydrive without download

Google spreadsheet to Pandas dataframe via Pydrive without download Question: How do I read the content of a Google spreadsheet into a Pandas dataframe without downloading the file? I think gspread or df2gspread may be good shots, but I’ve been working with pydrive so far and got close to the solution. With Pydrive I managed …

Total answers: 2

Google Drive Python API without Creating Project

Google Drive Python API without Creating Project Question: For the Google Drive Python API, in all the tutorials I have seen, they require users to create a project in their Google Dashboard, before obtaining a client ID and a client secret json file. I’ve been researching both the default Google Drive API and the pydrive …

Total answers: 2

reading csv file into python pandas

reading csv file into python pandas Question: I want to read a csv file into a pandas dataframe, but I get the following error when executing this code: filepath = "https://drive.google.com/file/d/1bUTjF-iM4WW7g_Iii62Zx56XNTkF2-I1/view" df = pd.read_csv(filepath) df.head(5) Asked By: Nazar || Source Answers: Try the following code snippet to read the CSV from Google Drive into the …

Total answers: 2

Automatically download large files in public GDrive folder

Automatically download large files in public GDrive folder Question: My end goal is to automatically download with python (with gdown for instance) all files in a folder of a public GDrive (each file is big like 3G). After a lot of trying I finally found a way to extract all links from the folder using …

Total answers: 1

How to upload and delete files with google drive API using python requests

How to upload and delete files with google drive API using python requests Question: I’m trying to upload a image to google drive using requests, but it’s not working because the requests keep giving me a status 401 (wrong credentials). I am using the access token that was given to me, so I don’t know …

Total answers: 1

Create new folder on Gdrive using pydrive module

Create new folder on Gdrive using pydrive module Question: Trying to create folder on google drive using pydrive: from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive gauth = GoogleAuth() gauth.LocalWebserverAuth() drive = GoogleDrive(gauth) Authentication works, I can download some files from my drive, etc. But can’t figure out, how to create new folder. I’m trying: …

Total answers: 2

Read excel file from google drive without downloading file

Read excel file from google drive without downloading file Question: I wants to read excel sheets from excel file on google drive without downloading on local machine! i searched for google drive api but couldn’t find solution i tried following code please need suggestion: ”’ from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive import pandas …

Total answers: 2

Google Drive API Quickstart.py Error 400: redirect_uri_mismatch

Google Drive API Quickstart.py Error 400: redirect_uri_mismatch Question: I’m using the https://developers.google.com/drive/api/v3/quickstart/python to access the Google Drive Api but Google keeps throwing redirect_uri_mismatch errors. I add the localhost:number from the error to the Authorised redirect URIs in the client ID for the Web Application, but whenever I run the quickstart.py, the local host number changes. …

Total answers: 2

Google Drive API How can I find the path of a file?

Google Drive API How can I find the path of a file? Question: I’m trying to find the path of a file when fetching a file list with the Google Drive API. Right now, I’m able to fetch file properties (currently only fetching checksum, id, name, and mimeType): results = globalShares.service.files().list(pageSize=1000,corpora=’user’,fields=’nextPageToken, files(md5Checksum, id, name, mimeType)’).execute() …

Total answers: 1