python - 使用参数作为变量错误Python
问题描述
尝试使用 int 变量"row"
作为Excelread
行中的参数,以便我可以迭代。我收到错误,因为 python 没有识别为 int 输入?
from automagica import *
Row = 2
current_run = ExcelReadCell(path="C:\\Users\\jmoloney\\Downloads\\Medicaid.xlsx", r=Row, c=1, sheet=None)
Row = Row+1
print(current_run)
输出:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: ExcelReadCell() got an unexpected keyword argument 'r'
解决方案
我想通了,格式已关闭,必须使用
ExcelReadRowCol(path="C:\Users\jmoloney\Downloads\Medicaid.xlsx", r=Row, c=1, sheet=None)
vs ExcelReadCell(xxx
推荐阅读
- ios - 获取'设备
未找到!' 运行 ideviceinfo 命令后的错误消息 - cytoscape.js - 如何使用鼠标拖放在 cytoscape 中的两个节点之间绘制边缘
- c++ - 无冲突的哈希函数
- typo3 - 从typo3 7 更新到typo3 8 后,页面内容中的几个无效值
- c - 在字符串和结构数组中查找动态内存分配错误
- c# - 选择和分配图像
- reactjs - react-hook-form,总是返回字符串类型值
- r - 更改闪亮主题的色调
- asp.net-core - 使用 AddDbContext 中的 DbCommandInterceptor 实现数据库活动指示器
- java - 错误的行数EditText