老师,我是读取 excel,dataframe 遍历,设置文本后,为啥报错如下,但是我的表格里面有供应商名称啊—————————— 运行开始: 2023-11-02 17:34:13.776 ——————————“D:/Program Files/ISRPA/Python/pythons.exe” “C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py” -p study1012_1—————————— BeginPython: 2023-11-02 17:34:17,900 ——————————[2023-11-02 17:34:18,184] [C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py] - [data_upload_clone] [读取 Excel] [SNTag:20231031095933421348] [][2023-11-02 17:34:18,280] [data_upload_clone] [读取 Excel] [SNTag:20231031095933421348] 返回值:[<class ‘pandas.core.frame.DataFrame’>] 0 1 … 8 90 序号 单据编号 … 业务小类 备注1 1 1 … 测试 税款 10 万元,建行还款 1 万,材料费 9 万2 2 2 …23 23 11 … 归还其他应付款 _ 资 …… columns][2023-11-02 17:34:18,280] [C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py] - [data_upload_clone] [dataframe 遍历] [SNTag:20231031095933433381] [][2023-11-02 17:34:18,280] [C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py] - [data_upload_clone] [设置文本] [SNTag:202311011656580793482] []Traceback (most recent call last):File “C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py”, line 543, in File “C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py”, line 307, in data_upload_cloneFile “D:\Program Files\ISRPA\Python\lib\site-packages\pandas\core\series.py”, line 958, in getitemFile “D:\Program Files\ISRPA\Python\lib\site-packages\pandas\core\series.py”, line 1069, in _get_valueFile “D:\Program Files\ISRPA\Python\lib\site-packages\pandas\core\indexes\base.py”, line 3631, in get_locKeyError: ‘供应商名称’运行异常
老师,我是读取 excel,dataframe 遍历,设置文本后,为啥报错如下,但是我的表格里面有供应商名称啊
—————————— 运行开始: 2023-11-02 17:34:13.776 ——————————
“D:/Program Files/ISRPA/Python/pythons.exe” “C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py” -p study1012_1
—————————— BeginPython: 2023-11-02 17:34:17,900 ——————————
[2023-11-02 17:34:18,184] [C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py] - [data_upload_clone] [读取 Excel] [SNTag:20231031095933421348] []
[2023-11-02 17:34:18,280] [data_upload_clone] [读取 Excel] [SNTag:20231031095933421348] 返回值:[<class ‘pandas.core.frame.DataFrame’>] 0 1 … 8 9
0 序号 单据编号 … 业务小类 备注
1 1 1 … 测试 税款 10 万元,建行还款 1 万,材料费 9 万
2 2 2 …
23 23 11 … 归还其他应付款 _ 资 …… columns]
[2023-11-02 17:34:18,280] [C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py] - [data_upload_clone] [dataframe 遍历] [SNTag:20231031095933433381] []
[2023-11-02 17:34:18,280] [C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py] - [data_upload_clone] [设置文本] [SNTag:202311011656580793482] []
Traceback (most recent call last):
File “C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py”, line 543, in
File “C:/Users/123/Desktop/RPA/study1012_1/codes/Main.py”, line 307, in data_upload_clone
File “D:\Program Files\ISRPA\Python\lib\site-packages\pandas\core\series.py”, line 958, in getitem
File “D:\Program Files\ISRPA\Python\lib\site-packages\pandas\core\series.py”, line 1069, in _get_value
File “D:\Program Files\ISRPA\Python\lib\site-packages\pandas\core\indexes\base.py”, line 3631, in get_loc
KeyError: ‘供应商名称’
运行异常