Skip to content

Update all indicators for pandas v2 #1825

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

Merged
merged 15 commits into from
Apr 11, 2023
Merged

Conversation

nmdefries
Copy link
Contributor

@nmdefries nmdefries commented Apr 4, 2023

Description

Update indicators to work with new pandas version 2.0.0. Most common change is to use numeric_only=True arg in sum() calls.

Fixes

Closes #1820

@krivard krivard changed the title changehc Update all indicators for pandas v2 Apr 5, 2023
@nmdefries nmdefries changed the base branch from ndefries/hhs_hosp/test-size-mismatch to main April 5, 2023 14:29
@nmdefries nmdefries marked this pull request as ready for review April 5, 2023 14:29
@nmdefries nmdefries requested review from dshemetov and krivard April 5, 2023 15:04
Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Can merge as-is, question minor

Comment on lines +243 to +244
pa_pop = int(state_pop.loc[state_pop.state_id == "pa", "pop"].iloc[0])
wv_pop = int(state_pop.loc[state_pop.state_id == "wv", "pop"].iloc[0])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wacky. good catch!

@nmdefries nmdefries requested a review from krivard April 5, 2023 18:26
Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 stellar adjustment, I totally missed that the other appends had been inside for() loops 😕

Copy link
Contributor

@dshemetov dshemetov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a pass through the deprecated list of options here to double check if we're using any of them. Didn't find any others.

Looks good to me 👍

@nmdefries
Copy link
Contributor Author

@krivard This is ready to merge but we should wait to release until early next week in case there are any pandas v2-related issues we missed.

@nmdefries nmdefries merged commit fb446a6 into main Apr 11, 2023
@nmdefries nmdefries deleted the ndefries/pandasv2-fix-tests branch April 11, 2023 18:18
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

Successfully merging this pull request may close these issues.

Upgrade indicators to pandas v2.0.0
3 participants