diff --git a/src/pipelines/shared/postprocessing/postprocess.py b/src/pipelines/shared/postprocessing/postprocess.py index e3cb3a0..542a106 100644 --- a/src/pipelines/shared/postprocessing/postprocess.py +++ b/src/pipelines/shared/postprocessing/postprocess.py @@ -136,9 +136,6 @@ def standard_postprocess(df, constants: Constants): df = postprocessing_funcs.attach_sid_column(df) - # Standardize output column order - this should ALWAYS be the final postprocessing step - df = postprocessing_funcs.reorder_columns(df, FIELD_FORMAT_MAPPING) - df["FILE_NAME"] = df["FILE_NAME"].apply(postprocessing_funcs.standardize_file_name) # This will remove non-standard characters from every cell in the DataFrame @@ -147,6 +144,8 @@ def standard_postprocess(df, constants: Constants): # Remove N/A values from all columns (standard cleaning for all outputs) df = postprocessing_funcs.clean_na_values(df) + # Standardize output column order - this should ALWAYS be the final postprocessing step + df = postprocessing_funcs.reorder_columns(df, FIELD_FORMAT_MAPPING) return df