Repository navigation
US Census ACS5yr S2409: Clean non-numeric characters in Quantity values - #2265
Open
kartik-s21 wants to merge 3 commits into
Open
kartik-s21 wants to merge 3 commits into
kartik-s21 wants to merge 3 commits into
Conversation
kartik-s21
force-pushed
the
s2409-refresh
branch
from
October 12, 2026 12:24
72efa6a to
f4847a2
Compare
kartik-s21
force-pushed
the
s2409-refresh
branch
from
October 12, 2026 12:24
f4847a2 to
3d77964
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the data loader to clean quantity values by removing commas, dashes, and plus signs before converting them to floats. Feedback suggests using pd.to_numeric with errors='coerce' and vectorized string operations to prevent potential ValueError crashes from unexpected non-numeric characters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
,, dashes-, and plus signs+in top/bottom-coded values like2,500-and250,000+) fromQuantityvalues inscripts/us_census/acs5yr/subject_tables/s2409/data_loader.pyand casts tofloatduring processing for the 2010–2024 S2409 refresh.Testing
python3 -m unittest scripts/us_census/acs5yr/subject_tables/s2409/subject_table_s2409_test.py