diff --git a/fieldExtraction/src/testbed/add_reimb_id_to_testbed.py b/fieldExtraction/src/testbed/add_reimb_id_to_testbed.py new file mode 100644 index 0000000..d35ac44 --- /dev/null +++ b/fieldExtraction/src/testbed/add_reimb_id_to_testbed.py @@ -0,0 +1,23 @@ +"""This script reads the testbed file, generates reimbursement IDs, +and saves the updated testbed with the new IDs. + +It should be run from the `fieldExtraction` directory, with the testbed file co-located in the same directory. +The output will be saved as `Doczy-Testbed-with-Reimb-IDs.xlsx`. + +Run it with `poetry run python -m src.testbed.add_reimb_id_to_testbed` +""" + +# Imports +import pandas as pd +from src.postprocessing_funcs import generate_reimb_ids +from src.constants.investment_columns import COLUMN_ORDER +from src.investment.investment_postprocessing_funcs import reorder_columns + +# Read the testbed file +testbed = pd.read_excel("Doczy-Testbed.xlsx") + +# Generate reimbursement IDs and reorder columns +testbed_w_ids = reorder_columns(generate_reimb_ids(testbed), COLUMN_ORDER) + +# Save the updated testbed with reimbursement IDs +testbed_w_ids.to_excel("Doczy-Testbed-with-Reimb-IDs.xlsx", index=False) \ No newline at end of file