PACKAGES

				
from gsheets import Sheets
import pandas as pd
			

CODES

                
def getSheet(name, sheetId):
    
    PURPOSE

    Just extract data from my database, which is all in Google Sheets.
    Output is simply a dataframe.
    There is a bunch of things to set up before this code can actually work,
    but once that's done, all you need is to input the name of the sheet, as well as the overall sheetId, found in the url.
    
    sheets = Sheets.from_files('client_secrets.json','~/storage.json')[sheetId]
    return sheets.find(name).to_frame()