Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
您应该可以通过使用 gspread 在访问访问 中检索表格的内容。 。
测试表:
!pip install --upgrade -q gspread import gspread import pandas as pd from google.colab import auth from google.auth import default auth.authenticate_user() creds, _ = default() gc = gspread.authorize(creds) # sh = gc.open_by_url("Insert Sheet URL here") sh = gc.open_by_key("Insert Sheet key here") worksheet = sh.worksheet("Sheet1") rows = worksheet.get_all_values() pd.DataFrame.from_records(rows)
>
You should be able to retrieve the content of a Sheet with View Only access in gspread by using open_by_key() or open_by_url().
open_by_key()
open_by_url()
Test Sheet:
Google Colab:
Result:
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
您应该可以通过使用 gspread 在访问访问 中检索表格的内容。 。
示例:
测试表:
>
sstatic.net/vayvd.png“ rel =“ nofollow
You should be able to retrieve the content of a Sheet with View Only access in gspread by using
open_by_key()
oropen_by_url()
.Example:
Test Sheet:
Google Colab:
Result:
Reference: