fix path
This commit is contained in:
parent
766463acaa
commit
9c0aff85e5
|
@ -20,8 +20,8 @@ exec(open('0_KPI_functions.py').read())
|
||||||
warnings.filterwarnings('ignore')
|
warnings.filterwarnings('ignore')
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
def generate_test_set():
|
def generate_test_set(type_of_comp):
|
||||||
file_path_list = fs.ls("projet-bdc2324-team1/Generalization/sport/Test_set")
|
file_path_list = fs.ls(f"projet-bdc2324-team1/Generalization/{type_of_comp}/Test_set")
|
||||||
test_set = pd.DataFrame()
|
test_set = pd.DataFrame()
|
||||||
for file in file_path_list:
|
for file in file_path_list:
|
||||||
print(file)
|
print(file)
|
||||||
|
@ -31,8 +31,8 @@ def generate_test_set():
|
||||||
return test_set
|
return test_set
|
||||||
|
|
||||||
|
|
||||||
def generate_train_set():
|
def generate_train_set(type_of_comp):
|
||||||
file_path_list = fs.ls("projet-bdc2324-team1/Generalization/sport/Train_set")
|
file_path_list = fs.ls(f"projet-bdc2324-team1/Generalization/{type_of_comp}/Train_set")
|
||||||
train_set = pd.DataFrame()
|
train_set = pd.DataFrame()
|
||||||
for file in file_path_list:
|
for file in file_path_list:
|
||||||
print(file)
|
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}/'
|
BUCKET_OUT = f'projet-bdc2324-team1/Generalization/{type_of_comp}/'
|
||||||
|
|
||||||
# create test and train datasets
|
# create test and train datasets
|
||||||
test_set = generate_test_set()
|
test_set = generate_test_set(type_of_comp)
|
||||||
train_set = generate_train_set()
|
train_set = generate_train_set(type_of_comp)
|
||||||
|
|
||||||
# Exportation test set
|
# Exportation test set
|
||||||
FILE_KEY_OUT_S3 = "Test_set.csv"
|
FILE_KEY_OUT_S3 = "Test_set.csv"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user