From 101de9c7e0b0809b08becdde31cb6e228a9b36c4 Mon Sep 17 00:00:00 2001 From: Courtenay Cotton Date: Mon, 9 Dec 2024 14:38:49 -0500 Subject: [PATCH] couple bugs --- reggie/ingestion/preprocessor/michigan_preprocessor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reggie/ingestion/preprocessor/michigan_preprocessor.py b/reggie/ingestion/preprocessor/michigan_preprocessor.py index 12abfe5d..a23de5dd 100644 --- a/reggie/ingestion/preprocessor/michigan_preprocessor.py +++ b/reggie/ingestion/preprocessor/michigan_preprocessor.py @@ -65,7 +65,7 @@ def execute(self): or "Entire State Voter History" in n["name"] ] + [None] - ) + )[:-1] elec_codes = ( [n for n in new_files if "electionscd" in n["name"]] + [None] )[0] @@ -170,9 +170,9 @@ def fill_empty_columns(df): vdf = vdf.reindex(columns=self.config["ordered_columns"]) vdf[self.config["party_identifier"]] = "npa" + hdf = pd.DataFrame() for hist_file in hist_files: logging.info("Loading history file: " + hist_file["name"]) - hdf = pd.DataFrame() if hist_file["name"][-3:] == "lst": hcolspecs = [ [0, 13],