mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-07 01:04:18 -07:00
Issue 1992: Do not impute income for null population tracts (#1993)
This commit is contained in:
parent
72de938c32
commit
e2641fe2a6
1 changed files with 3 additions and 3 deletions
|
@ -76,10 +76,10 @@ def _prepare_dataframe_for_imputation(
|
||||||
# First, check whether any of the columns we want to impute contain null
|
# First, check whether any of the columns we want to impute contain null
|
||||||
# values
|
# values
|
||||||
geo_df[imputing_cols].isna().any(axis=1)
|
geo_df[imputing_cols].isna().any(axis=1)
|
||||||
# Second, ensure population is either null or >= the minimum population
|
# Second, ensure population is not null and >= the minimum population
|
||||||
& (
|
& (
|
||||||
geo_df[population_field].isnull()
|
geo_df[population_field].notnull()
|
||||||
| (
|
& (
|
||||||
geo_df[population_field]
|
geo_df[population_field]
|
||||||
>= minimum_population_required_for_imputation
|
>= minimum_population_required_for_imputation
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue