我有一个双嵌套字典,其中返回的值是一个列表,其中包含一个人的特征。我想把列表中的每一个值都写到谷歌表单中,所以我使用了gspread。这是我的密码:
for person in list_id:
index = 2
for key, value in enrich_dict.items():
for keytwo, valuetwo in value.items():
row = [valuetwo[0], valuetwo[1], valuetwo[2], valuetwo[3], person]
sheet.insert_row(row, index)
index += 1
出于某种原因,valuetwo[3]从未插入到工作表中,我只得到4列数据。无论我使用什么数据进行测试(尝试使用简单字符串),情况总是如此,第四个值被跳过
你能举一个输入和预期输出的例子吗
相关问题 更多 >
编程相关推荐