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

运行train_rl.py中df = fe.preprocess_data(df)似乎因为stockstats报错 #2

Open
RTkenny opened this issue Nov 6, 2023 · 4 comments

Comments

@RTkenny
Copy link

RTkenny commented Nov 6, 2023

image

@RTkenny
Copy link
Author

RTkenny commented Nov 6, 2023

您好,我对您的理论和实验很感兴趣,我在复现的时候遇到一些问题,很期望您的回复。一开始的时候我按照requirements.txt中的stockstats==0.3.2安装了stockstats,然后在stockstats在from int_date import get_date_from_diff这句代码中报错unable to import get_date_from_diff。随后我将stockstats换为0.4.0,然后再运行train_rl.py就出现了以上的报错,似乎是和add_technical_indicator计算技术因子的函数有关,请问该如何解决呢

@zlio
Copy link

zlio commented Nov 8, 2023

同样的问题,请问作者如何处理

@Yanglegezhan
Copy link

您好,我对您的理论和实验很感兴趣,我在复现的时候遇到一些问题,很期望您的回复。一开始的时候我按照requirements.txt中的stockstats==0.3.2安装了stockstats,然后在stockstats在from int_date import get_date_from_diff这句代码中报错unable to import get_date_from_diff。随后我将stockstats换为0.4.0,然后再运行train_rl.py就出现了以上的报错,似乎是和add_technical_indicator计算技术因子的函数有关,请问该如何解决呢

我也遇到一样的问题,接下来我将preprocessors.py中第185行
indicator_df = indicator_df.append(
temp_indicator, ignore_index=True
)
的append改为_append即可正常运行

@15101051
Copy link

如上面所说,这个问题是pandas更新后取消了append导致的,可以将indicator_df.append都改为 _append 或者使用pd.concat

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

4 participants