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

Future warning with import_pbp_data() #42

Closed
raerickson opened this issue Jan 7, 2023 · 3 comments
Closed

Future warning with import_pbp_data() #42

raerickson opened this issue Jan 7, 2023 · 3 comments

Comments

@raerickson
Copy link

Great package. Thank you for your hard work!

I searched through the repo and didn't find any issues for this issue. I'm using Python version 3.10 and Pandas version 1.5.2 and obtain a future warning when running import_pbp_data():

import nfl_data_py as nfl
pbp_py = nfl.import_pbp_data([2022])
/home/raerickson/miniconda3/envs/football/lib/python3.10/site-packages/nfl_data_py/__init__.py:137: FutureWarning: In a future version, `df.iloc[:, i] = newvals` will attempt to set the values inplace instead of always setting a new array. To retain the old behavior, use either `df[df.columns[i]] = newvals` or, if columns are non-unique, `df.isetitem(i, newvals)`
  plays.loc[:, cols] = plays.loc[:, cols].astype(numpy.float32)

Sorry, but I don't have time to dig in, but I think this is a quick fix.

@alecglen
Copy link
Member

alecglen commented Jan 7, 2023

Hey @raerickson, appreciate the report! It seems that is actually a Pandas issue they're working on currently. pandas-dev/pandas#48673

@raerickson
Copy link
Author

@alecglen Thanks for digging in. Should my issue be closed? Or do you want to leave it open in case others try to report the bug.

@alecglen
Copy link
Member

@raerickson This can be closed now. The issue should be resolved if you update your Pandas to version 1.5.3+.

@alecglen alecglen closed this as completed Jun 5, 2023
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