Skip to content

Instantly share code, notes, and snippets.

@songokjesse
Created October 26, 2020 08:14
Show Gist options
  • Save songokjesse/2887057eb9308ad099214ec3ab340629 to your computer and use it in GitHub Desktop.
Save songokjesse/2887057eb9308ad099214ec3ab340629 to your computer and use it in GitHub Desktop.
Installation and instantiation of google sheet gspread dependencies
import gspread
import pandas as pd
from oauth2client.service_account import ServiceAccountCredentials
from collections import OrderedDict
# define scope
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
# add credentials to the account
creds = ServiceAccountCredentials.from_json_keyfile_name('add_json_file_here.json', scope)
# authorize the clientsheet
client = gspread.authorize(creds)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment