mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 01:54:18 -08:00
Fix bug that dropped rows from island territories (#981)
Co-authored-by: lucasmbrown-usds <lucas.m.brown@omb.eop.gov>
This commit is contained in:
parent
07ee4165b4
commit
bbc4a4dec0
1 changed files with 7 additions and 2 deletions
|
@ -2,6 +2,7 @@ from pathlib import Path
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from data_pipeline.etl.base import ExtractTransformLoad
|
from data_pipeline.etl.base import ExtractTransformLoad
|
||||||
from data_pipeline.utils import get_module_logger, zip_files
|
from data_pipeline.utils import get_module_logger, zip_files
|
||||||
|
from data_pipeline.score import field_names
|
||||||
|
|
||||||
|
|
||||||
from data_pipeline.etl.sources.census.etl_utils import (
|
from data_pipeline.etl.sources.census.etl_utils import (
|
||||||
|
@ -179,7 +180,9 @@ class PostScoreETL(ExtractTransformLoad):
|
||||||
)
|
)
|
||||||
|
|
||||||
# list the null score tracts
|
# list the null score tracts
|
||||||
null_tract_df = merged_df[merged_df["Score E (percentile)"].isnull()]
|
null_tract_df = merged_df[
|
||||||
|
merged_df[field_names.SCORE_L_COMMUNITIES].isnull()
|
||||||
|
]
|
||||||
|
|
||||||
# subtract data sets
|
# subtract data sets
|
||||||
# this follows the XOR pattern outlined here:
|
# this follows the XOR pattern outlined here:
|
||||||
|
@ -267,7 +270,9 @@ class PostScoreETL(ExtractTransformLoad):
|
||||||
|
|
||||||
# Rename score column
|
# Rename score column
|
||||||
downloadable_df_copy = downloadable_df.rename(
|
downloadable_df_copy = downloadable_df.rename(
|
||||||
columns={"Score G (communities)": "Community of focus (v0.1)"},
|
columns={
|
||||||
|
field_names.SCORE_L_COMMUNITIES: "Community of focus (v0.1)"
|
||||||
|
},
|
||||||
inplace=False,
|
inplace=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue