From 1aafc9bddac77e1b16b8db3bfa60dd44daf28ebb Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 22 Jun 2021 01:10:05 +0200 Subject: [PATCH] Fix element modification in dataframe list --- src/execution.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/execution.py b/src/execution.py index 0d9963d..57927c4 100644 --- a/src/execution.py +++ b/src/execution.py @@ -55,10 +55,9 @@ def script_execution(filenames, df_list, iterations=2): ["memetic", "random"], ["memetic", "best"], ] - populated_list = [] for dataset in filenames: print(f"Running on dataset {dataset}") - for df, params in zip(df_list, parameters): + for index, params in zip(range(4), parameters): print(f"Running {params} algorithm") output_list = [] for _ in range(iterations): @@ -66,8 +65,8 @@ def script_execution(filenames, df_list, iterations=2): [executable, script, dataset, *params], capture_output=True ).stdout.splitlines() output_list.append(output_cmd) - populated_list.append(populate_dataframe(df, output_list, dataset)) - return populated_list + df_list[index] = populate_dataframe(df_list[index], output_list, dataset) + return df_list def export_results(df_list):