Answers for "read google sheet python"

0

pandas read google sheet

from io import BytesIO
import pandas as pd
import requests
r = requests.get('https://docs.google.com/spreadsheet/ccc?key=0Ak1ecr7i0wotdGJmTURJRnZLYlV3M2daNTRubTdwTXc&output=csv')
data = r.content
df = pd.read_csv(BytesIO(data), index_col=0,parse_dates=['Quradate'])
df.head()
Posted by: Guest on November-20-2020
4

google sheet python read

# google sheet package
from gsheets import Sheets

# Authorizing the api
#create oath credentials and generate a json file and paste here
sheets = Sheets.from_files('FD4GS.json', 'FD4GS_cache.json')



vi1 = sheets.get('#Paste your sheet id')

vi1_form1_ws = vi1.sheets[0] #Sheet range

entries1 = vi1_form1_ws.values()[1:] #Here I'm traversing from 2nd columns

entries1 = [(i[2], i[6], i[1]) for i in entries1] # This represent, in my spread sheet I have 6 columns
Posted by: Guest on August-09-2021

Python Answers by Framework

Browse Popular Code Answers by Language