これをそのままコピペして値を入力すればworksheetにシートがごそっと入ります!
Google Drive APIが必要なので取得してjson部分に入れてください。
import os import gspread from oauth2client.service_account import ServiceAccountCredentials DOC_ID = "○○○○○○○○○" JSON_PATH = "○○○○○.json" scope = ['https://spreadsheets.google.com/feeds'] path = os.path.expanduser(JSON_PATH) credentials = ServiceAccountCredentials.from_json_keyfile_name(path, scope) client = gspread.authorize(credentials) gfile = client.open_by_key(DOC_ID) SHEET_NAME = "○○○○○" worksheet = gfile.worksheet(SHEET_NAME)