- 积分
- 4593
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-10-2
- 最后登录
- 1970-1-1

|
发表于 2022-5-14 16:07:11
|
显示全部楼层
请教一下,为什么程序运行总是提示 File "D:\anaconda\envs\py37\lib\site-packages\pandas\core\indexes\range.py", line 351, in get_loc
return self._range.index(new_key)
ValueError: 34 is not in range
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "f:\chengxu\fkx.py", line 72, in <module>
angle = DF['wd'][ihr * 34 + ii]
File "D:\anaconda\envs\py37\lib\site-packages\pandas\core\series.py", line 853, in __getitem__
return self._get_value(key)
File "D:\anaconda\envs\py37\lib\site-packages\pandas\core\series.py", line 961, in _get_value
loc = self.index.get_loc(label)
File "D:\anaconda\envs\py37\lib\site-packages\pandas\core\indexes\range.py", line 353, in get_loc
raise KeyError(key) from err
KeyError: 34 |
|