Merged in bugfix/update-postprocessing-paths (pull request #896)

Update postprocessing paths

* Update postprocessing paths


Approved-by: Siddhant Medar
This commit is contained in:
Katon Minhas
2026-03-04 22:35:33 +00:00
parent 22c3d80692
commit e99e554d23
+7 -7
View File
@@ -1,14 +1,14 @@
import pandas as pd
from constants.constants import Constants
from src.investment.postprocess import postprocess
from src.constants.constants import Constants
from src.pipelines.shared.postprocessing.postprocess import postprocess
# File paths
input_excel_path = "input.xlsx"
input_excel_path = "input.csv"
output_csv_path = "output.csv"
# Read Excel file into DataFrame
print(f"Reading Excel file: {input_excel_path}")
df = pd.read_excel(input_excel_path, dtype=str)
df = pd.read_csv(input_excel_path, dtype=str)
print(f"Loaded {len(df)} rows from Excel")
# Initialize Constants
@@ -16,10 +16,10 @@ constants = Constants()
# Process the DataFrame
print("Processing data through postprocess()...")
df_processed = postprocess(df, constants)
print(f"Processing complete. Output has {len(df_processed)} rows")
cc_df, dashboard_df = postprocess(df, constants)
print(f"Processing complete. Output has {len(cc_df)} rows")
# Write to CSV
print(f"Writing CSV file: {output_csv_path}")
df_processed.to_csv(output_csv_path, index=False)
cc_df.to_csv(output_csv_path, index=False)
print("Done!")