Skip to content

Commit 54c6627

Browse files
committed
Changed (allocation_tool.py): Preserve Original CSV Name and Rename Adjusted File for Prediction
Updated the script to retain the original CSV file name and rename the adjusted CSV file as csv_adjusted_for_prediction. This change ensures the original file remains unchanged while clearly distinguishing the adjusted version.
1 parent ce03de6 commit 54c6627

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

allocation_tool.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,5 @@ def calculate_missing_bins_rf (self, id_difference, csv):
577577
# Drop column 'v_zone'
578578
df_new=df_new.drop(['v_zone'], axis=1)
579579

580-
# Copy the original csv file copy and rename it to csv_orig
581-
shutil.copyfile(csv, csv.split('.')[0] + '_orig' + '.csv')
582-
583580
# Save the new result to csv
584-
df_new.to_csv(csv, index=False)
581+
df_new.to_csv(csv.split('.')[0] + '_adjusted_for_prediction' + '.csv', index=False)

0 commit comments

Comments
 (0)