Skip to content

Instantly share code, notes, and snippets.

@francoisstamant
Created November 30, 2021 00:49
Show Gist options
  • Save francoisstamant/a550ca7d440653c4da841be3c085e36b to your computer and use it in GitHub Desktop.
Save francoisstamant/a550ca7d440653c4da841be3c085e36b to your computer and use it in GitHub Desktop.
import pandas as pd
import gspread
from gspread_dataframe import set_with_dataframe
# Acces google sheet
gc = gspread.service_account(filename= ”location of your JSON file”)
sh = gc.open_by_key('spreadsheetID')
worksheet = sh.worksheet('WorksheetName')
# Add data to sheet
set_with_dataframe(worksheet, df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment