gspread

    1热度

    1回答

    我有一个表格,它以Python列表的形式列出,我想用gspread库将其写入一些Google Spreadsheet。但是,gspread似乎没有这种功能。当然,我可以使用循环和更新特定的单元格,但这是非常低效的解决方案,因为它必须执行多个请求(每个单元一个请求)。如何做得更好?

    1热度

    2回答

    我正在使用gspread库从Google电子表格中读取单元格值。 我要循环,如范围: col_index=3 i=0 while i<4: cell_values_list=[worksheet.cell(r, c).value for r in range(10,20) for c in range(col_index,col_index+3)] ... ...

    1热度

    1回答

    我的工作表被命名为'doc_name',它有两个工作表'sheet1'和'sheet2'。但是,我只能将数据写入标有'sheet1'的工作表中? 这是一个限制还是我做错了什么? 这个作品, wks = gc.open("doc_name").sheet1 ,但失败了, wks = gc.open("doc_name").sheet2 给这个错误, AttributeError的: '电子表

    1热度

    1回答

    我想写一个简单的脚本,将csv作为输入,并将其写入单个电子表格文档。现在我有它的工作,但脚本很慢。大约需要10分钟才能在两张工作表中书写cca 350行。 这里是脚本我有: #!/usr/bin/python import json, sys import gspread from oauth2client.client import SignedJwtAssertionCredential

    1热度

    1回答

    我编写了一个脚本来连接到Google电子表格,并从中将数据加载到postgresql数据库中。 我已经创建了一个服务帐户,并在以.json格式获得必要的凭证吧,问题是,当我试图共享谷歌片与我的服务帐户的电子邮件,我收到一封电子邮件,说: Delivery to the following recipient failed permanently: [email protected] Techn

    0热度

    1回答

    我有几行代码,直到今天使用得很好(使用gspread)。每当我运行此代码时,我都会收到证书验证错误: json_key = json.load(open('Sheetmodification_abc.json')) scope = ['https://spreadsheets.google.com/feeds'] credentials = SignedJwtAssertionCredent

    1热度

    1回答

    我创建使用gspread和的oauth2模块 import gspread from oauth2client.client import SignedJwtAssertionCredentials credentials = SignedJwtAssertionCredentials("client_email","private_key", "https://spreadsheets.g

    2热度

    0回答

    根据以下文章#244验证凭证,我们可以定义GOOGLE_APPLICATION_CREDENTIALS环境变量以直接进行身份验证。 这是我在我的代码中所做的。 import gspread from oauth2client.client import GoogleCredentials credentials = GoogleCredentials.get_application_defau

    2热度

    1回答

    我需要下载Google电子表格文件系统,我使用Gspread从Google Drive读取文件,它工作正常。 我试图导出到CSV,但这当然放弃格式。 json_key = json.load(open('/googleDriveCredentials.json')) scope = ['https://spreadsheets.google.com/feeds'] creden

    6热度

    1回答

    使用caffe时,要创建包含图像的训练数据集,我们需要以特殊格式(如lmdb)创建数据库,但是有任何选项可传递给caffe批次的图像,例如vector<cv::Mat>? 为了澄清我正在寻找解决方案,可以处理大量的不能装入存储器图像(但假设一个训练批次(例如含有50个图像)可被存储在存储器中)。