Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculate_indicator.get_indicators处理异常 #130

Open
louyongjiu opened this issue Dec 7, 2024 · 1 comment
Open

calculate_indicator.get_indicators处理异常 #130

louyongjiu opened this issue Dec 7, 2024 · 1 comment

Comments

@louyongjiu
Copy link

2024-12-06 22:33:19 - ERROR - calculate_indicator.get_indicators处理异常:Length of values (0) does not match length of index (1)
Traceback (most recent call last):
File "D:\User\Repository\stock\instock\core\indicator\calculate_indicator.py", line 136, in get_indicators
data.loc[:, 'pdi'] = data['pdm'].values / data['atr'].values
~~~~~~~~^^^^^^^^^^
File "D:\User\Kit\Python\Python311\Lib\site-packages\pandas\core\indexing.py", line 911, in setitem
iloc._setitem_with_indexer(indexer, value, self.name)
File "D:\User\Kit\Python\Python311\Lib\site-packages\pandas\core\indexing.py", line 1857, in _setitem_with_indexer
self.obj[key] = value
~~~~~~~~^^^^^
File "D:\User\Kit\Python\Python311\Lib\site-packages\pandas\core\frame.py", line 4311, in setitem
self._set_item(key, value)
File "D:\User\Kit\Python\Python311\Lib\site-packages\pandas\core\frame.py", line 4524, in _set_item
value, refs = self._sanitize_column(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\User\Kit\Python\Python311\Lib\site-packages\pandas\core\frame.py", line 5266, in _sanitize_column
com.require_length_match(value, self.index)
File "D:\User\Kit\Python\Python311\Lib\site-packages\pandas\core\common.py", line 573, in require_length_match
raise ValueError(
ValueError: Length of values (0) does not match length of index (1)

@jiejie-dev
Copy link

遇到同样的问题,请问你解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants