您好,我使用的是Google Colaboratory (类似于Jupyter Notebook)。有谁知道如何使用谷歌协作笔记本从谷歌工作表中访问数据?
发布于 2019-06-03 19:47:43
!pip install --upgrade -q gspread
import gspread
import pandas as pd
from google.colab import auth
from oauth2client.client import GoogleCredentials
auth.authenticate_user()
gc = gspread.authorize(GoogleCredentials.get_application_default())
worksheet = gc.open('data_set.csv').sheet1
rows = worksheet.get_all_values()
pd.DataFrame.from_records(rows)https://stackoverflow.com/questions/48470691
复制相似问题