Skip to content

Instantly share code, notes, and snippets.

@thepycoach
Created May 25, 2022 00:52
Show Gist options
  • Save thepycoach/75535a864d4b0206173ba9f59b816007 to your computer and use it in GitHub Desktop.
Save thepycoach/75535a864d4b0206173ba9f59b816007 to your computer and use it in GitHub Desktop.
import gspread
from oauth2client.service_account import ServiceAccountCredentials
import pandas as pd
# Connect to Google Sheets
scope = ['https://www.googleapis.com/auth/spreadsheets',
"https://www.googleapis.com/auth/drive"]
credentials = ServiceAccountCredentials.from_json_keyfile_name("gs_credentials.json", scope)
client = gspread.authorize(credentials)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment