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

Handle latest version of pandas in airnow #147

Closed
lambertaa opened this issue Nov 8, 2023 · 1 comment
Closed

Handle latest version of pandas in airnow #147

lambertaa opened this issue Nov 8, 2023 · 1 comment

Comments

@lambertaa
Copy link

Currently, the airnow module uses an iteration of pd.read_csv() that uses error_bad_lines and warn_bad_lines arguments. These arguments do not exist in the latest versions of pandas (>=1.3.0). The try/except captures the error and outputs an empty dataframe. So, the result of airnow.add_data(...) is an empty dataframe.

For up to date pandas versions, these arguments are replaced with on_bad_lines with options of 'error', 'warn', or 'skip'. Replacing the deprecated arguments with on_bad_lines produces the desired result.

@zmoon
Copy link
Member

zmoon commented Nov 13, 2023

Hi @lambertaa , thanks much for reporting this. I have addressed this in #146, but it hasn't been merged yet. I am going to close this in favor of #111 which includes other things that need to be addressed for pandas v2 support.

@zmoon zmoon closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 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