Skip to content

Commit

Permalink
try try try try
Browse files Browse the repository at this point in the history
  • Loading branch information
benhammondmusic committed Feb 17, 2024
1 parent f5be865 commit 679a840
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/datasources/acs_population.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,10 @@ def standardize_race_exclude_hispanic(self, df):
Hispanic or Latino from other racial groups. Summing across all race
categories equals the total population."""

if df.empty:
# If DataFrame is empty, return an empty DataFrame with the expected columns
return pd.DataFrame(columns=[std_col.RACE_CATEGORY_ID_COL] + self.base_group_by_cols)

def get_race_category_id_exclude_hispanic(row):
if row[std_col.HISPANIC_COL] == 'Hispanic or Latino':
return Race.HISP.value
Expand Down

0 comments on commit 679a840

Please sign in to comment.