Fix element modification in dataframe list

This commit is contained in:
coolneng 2021-06-22 01:10:05 +02:00
parent fb5e9dc703
commit 1aafc9bdda
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 3 additions and 4 deletions

View File

@ -55,10 +55,9 @@ def script_execution(filenames, df_list, iterations=2):
["memetic", "random"], ["memetic", "random"],
["memetic", "best"], ["memetic", "best"],
] ]
populated_list = []
for dataset in filenames: for dataset in filenames:
print(f"Running on dataset {dataset}") 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") print(f"Running {params} algorithm")
output_list = [] output_list = []
for _ in range(iterations): for _ in range(iterations):
@ -66,8 +65,8 @@ def script_execution(filenames, df_list, iterations=2):
[executable, script, dataset, *params], capture_output=True [executable, script, dataset, *params], capture_output=True
).stdout.splitlines() ).stdout.splitlines()
output_list.append(output_cmd) output_list.append(output_cmd)
populated_list.append(populate_dataframe(df, output_list, dataset)) df_list[index] = populate_dataframe(df_list[index], output_list, dataset)
return populated_list return df_list
def export_results(df_list): def export_results(df_list):