Skip to content

Instantly share code, notes, and snippets.

@ronnydw
Forked from sudar/gsheet.py
Created June 12, 2018 15:55
Show Gist options
  • Save ronnydw/bafa7e29c207d0c53c99cbb9d6ebbdd7 to your computer and use it in GitHub Desktop.
Save ronnydw/bafa7e29c207d0c53c99cbb9d6ebbdd7 to your computer and use it in GitHub Desktop.
Read data from Google Sheet into a Python Pandas DataFrame. Details at http://sudarmuthu.com/blog/read-data-from-google-sheet-into-a-python-pandas-dataframe/
import gspread
import pandas
gc = gspread.login('my@email.com', 'supersecretepassword')
book = gc.open('Spreadsheet name')
sheet = book.sheet1 #choose the first sheet
dataframe = pandas.DataFrame(sheet.get_all_records())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment