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

v1.0.0版本main.py文件81行代码运行时出现警告提示 #8

Open
ywwjg opened this issue Sep 7, 2023 · 1 comment
Open

v1.0.0版本main.py文件81行代码运行时出现警告提示 #8

ywwjg opened this issue Sep 7, 2023 · 1 comment

Comments

@ywwjg
Copy link

ywwjg commented Sep 7, 2023

F:\martingle\main.py:81: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos]
value = {'pct': pct[-1], 'pct_4h':pct_4h[-1] , 'symbol': symbol, 'hour_turnover': df['turnover'][-1]}

@ywwjg
Copy link
Author

ywwjg commented Sep 7, 2023

尝试把81行代码改为

value = {'pct': pct.iloc[-1], 'pct_4h':pct_4h.iloc[-1] , 'symbol': symbol, 'hour_turnover': df['turnover'].iloc[-1]}
后不再出现警告提示,不知道改的对不对😂

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

1 participant