From 9c0aff85e574a9294bf9a31db254961640a515d9 Mon Sep 17 00:00:00 2001 From: arevelle-ensae Date: Thu, 29 Feb 2024 11:12:46 +0000 Subject: [PATCH] fix path --- 0_3_General_modelization_dataset.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/0_3_General_modelization_dataset.py b/0_3_General_modelization_dataset.py index 0161ea7..2ba6a75 100644 --- a/0_3_General_modelization_dataset.py +++ b/0_3_General_modelization_dataset.py @@ -20,8 +20,8 @@ exec(open('0_KPI_functions.py').read()) warnings.filterwarnings('ignore') # functions -def generate_test_set(): - file_path_list = fs.ls("projet-bdc2324-team1/Generalization/sport/Test_set") +def generate_test_set(type_of_comp): + file_path_list = fs.ls(f"projet-bdc2324-team1/Generalization/{type_of_comp}/Test_set") test_set = pd.DataFrame() for file in file_path_list: print(file) @@ -31,8 +31,8 @@ def generate_test_set(): return test_set -def generate_train_set(): - file_path_list = fs.ls("projet-bdc2324-team1/Generalization/sport/Train_set") +def generate_train_set(type_of_comp): + file_path_list = fs.ls(f"projet-bdc2324-team1/Generalization/{type_of_comp}/Train_set") train_set = pd.DataFrame() for file in file_path_list: print(file) @@ -46,8 +46,8 @@ type_of_comp = input('Choisissez le type de compagnie : sport ? musique ? musee BUCKET_OUT = f'projet-bdc2324-team1/Generalization/{type_of_comp}/' # create test and train datasets -test_set = generate_test_set() -train_set = generate_train_set() +test_set = generate_test_set(type_of_comp) +train_set = generate_train_set(type_of_comp) # Exportation test set FILE_KEY_OUT_S3 = "Test_set.csv"