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

Calling float on a single element Series is deprecated #223

Open
dirwin5 opened this issue Sep 6, 2024 · 2 comments
Open

Calling float on a single element Series is deprecated #223

dirwin5 opened this issue Sep 6, 2024 · 2 comments

Comments

@dirwin5
Copy link

dirwin5 commented Sep 6, 2024

Getting multiple FutureWarnings in swmmio/graphics/profiler.py. FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead. I'll try to fix and submit a PR.

Affected lines:
swmmio/graphics/profiler.py:35
swmmio/graphics/profiler.py:47
swmmio/graphics/profiler.py:57
swmmio/graphics/profiler.py:90
swmmio/graphics/profiler.py:94
swmmio/graphics/profiler.py:139
swmmio/graphics/profiler.py:140
swmmio/graphics/profiler.py:147
swmmio/graphics/profiler.py:148
swmmio/graphics/profiler.py:149
swmmio/graphics/profiler.py:277
swmmio/graphics/profiler.py:281
swmmio/graphics/profiler.py:301
swmmio/graphics/profiler.py:305

@bemcdonnell
Copy link
Member

bemcdonnell commented Sep 6, 2024

@dirwin5, thanks for noticing this. We’d love the PR if you have time. Was this a change in a recent release of pandas?

@dirwin5
Copy link
Author

dirwin5 commented Sep 6, 2024

Hi @bemcdonnell, yes it's pandas related, I believe since Pandas 2.0. There's an issue on the pandas-dev repo related to it here pandas-dev/pandas#51101

I've drafted a PR, thanks.

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