You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
报一下错误 File "D:\06_projects\python\stock_trade\alphas191.py", line 62, in <module> alpha_001 = l.alpha_001(OPEN=OPEN, CLOSE=CLOSE, VOLUME=VOLUME) File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\ta_cn\alphas\alpha191.py", line 14, in alpha_001 return (-1 * CORR(RANK(DELTA(LOG(VOLUME), 1)), RANK(((CLOSE - OPEN) / OPEN)), 6)) File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\ta_cn\utils_long.py", line 112, in decorated return pd.Series(s3, index=s1.index) File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\pandas\core\series.py", line 386, in __init__ if is_empty_data(data) and dtype is None: File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\pandas\core\construction.py", line 877, in is_empty_data is_simple_empty = is_list_like_without_dtype and not data File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\pandas\core\generic.py", line 1527, in __nonzero__ raise ValueError( ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
而且,dataframe的索引还必须设置asset,不然报错,这是什么原因?难道不能单独求值?
The text was updated successfully, but these errors were encountered:
报一下错误
File "D:\06_projects\python\stock_trade\alphas191.py", line 62, in <module> alpha_001 = l.alpha_001(OPEN=OPEN, CLOSE=CLOSE, VOLUME=VOLUME) File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\ta_cn\alphas\alpha191.py", line 14, in alpha_001 return (-1 * CORR(RANK(DELTA(LOG(VOLUME), 1)), RANK(((CLOSE - OPEN) / OPEN)), 6)) File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\ta_cn\utils_long.py", line 112, in decorated return pd.Series(s3, index=s1.index) File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\pandas\core\series.py", line 386, in __init__ if is_empty_data(data) and dtype is None: File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\pandas\core\construction.py", line 877, in is_empty_data is_simple_empty = is_list_like_without_dtype and not data File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\pandas\core\generic.py", line 1527, in __nonzero__ raise ValueError( ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
而且,dataframe的索引还必须设置asset,不然报错,这是什么原因?难道不能单独求值?
The text was updated successfully, but these errors were encountered: