python - Append Row to Google Spreadsheet-->TypeError: keys must be a string
问题描述
我正在尝试将一行附加到 google 电子表格,但出现错误。通常它可以工作,但现在它说:
TypeError: keys must be a string
有谁知道这意味着什么?
这是我的代码和我尝试插入的所有数据类型的打印。电子表格的 numpy 类型或布尔值是否存在问题?
for e in range(experiments):
#types: <class 'int'>,<class 'str'>,<class 'numpy.str_'>,<class 'float'>,<class 'int'>,<class 'int'>,<class 'numpy.float64'>,<class 'numpy.float64'>,<class 'numpy.float64'>,<class 'int'>,<class 'collections.defaultdict'>,<class 'int'>,<class 'int'>,<class 'float'>,<class 'bool'>
insertRow=[training,gameList[e],stateList[e], eps, experiments,timesteps,min_rewardList[e],maxRewList[e],total_rewList[e],currentMaxXList[e],maxXList[e],frames_stack,mb_size,learning_rate,completed_levelList[e]]
sheet.append_row(insertRow)
解决方案
推荐阅读
- xamarin.forms - 将第一个 StackLayout 定位在页面底部 Xamarin.Forms
- c# - For循环异步问题C#
- excel - 从列表中选择默认打印机,而不是硬编码
- python - 使用 python 运行 mapreduce 作业(MRjob)时,命令行上出现意外的参数错误
- javascript - 使用谷歌脚本和 html 模板循环进入项目符号
- python - pip2:ImportError:无法导入名称 RequirementParseError
- ios - 当 options = nil 初始化时,CBCentralManager 的默认警报操作是什么?
- android - 如何在 Android 中使用 Kotlin 添加音效
- python - 在 Pandas 中对带有数字的字符串列进行排序
- javascript - 使用 Selenium 添加 JavaScript 事件监听器会自动触发它