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

Fix warnings dataset utils #3598

Merged

Conversation

benhammondmusic
Copy link
Collaborator

@benhammondmusic benhammondmusic commented Aug 27, 2024

Description and Motivation

  • adjust loading utility to cast None as np.nan using the Pandas 3 "no silent downcasting" behavior
  • adjust remaining tests to expect np.nan for missing data

NOTE: we should aim to always use np.nan to represent missing Pandas DF data, and reserve None for Python things like undefined args, etc.

Has this been tested? How?

  • tests pass
  • no more future warnings from these test files

Types of changes

(leave all that apply)

  • Future Bug fix

New frontend preview link is below in the Netlify comment 😎

Copy link

netlify bot commented Aug 27, 2024

Deploy Preview for health-equity-tracker ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d07c234
🔍 Latest deploy log https://app.netlify.com/sites/health-equity-tracker/deploys/66cf31b85d524000089ddf7d
😎 Deploy Preview https://deploy-preview-3598--health-equity-tracker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@benhammondmusic benhammondmusic marked this pull request as ready for review August 28, 2024 14:18
@benhammondmusic benhammondmusic merged commit ba98992 into SatcherInstitute:main Aug 28, 2024
8 checks passed
@benhammondmusic benhammondmusic deleted the fix-warnings-dataset-utils branch August 28, 2024 16:21
kccrtv pushed a commit to kccrtv/health-equity-tracker that referenced this pull request Aug 29, 2024
# Description and Motivation
<!--- bulleted, high level items. use keywords (eg "closes SatcherInstitute#144" or
"fixes #4323") -->

- adjust loading utility to cast `None` as `np.nan` using the Pandas 3
"no silent downcasting" behavior
- adjust remaining tests to expect `np.nan` for missing data

NOTE: we should aim to always use `np.nan` to represent missing Pandas
DF data, and reserve `None` for Python things like undefined args, etc.

## Has this been tested? How?

- tests pass
- no more future warnings from these test files 

## Types of changes

(leave all that apply)

- Future Bug fix

## New frontend preview link is below in the Netlify comment 😎
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.

2 participants