diff --git a/main_package/classes/importer.py b/main_package/classes/importer.py index b21c1d9..52a9cbc 100644 --- a/main_package/classes/importer.py +++ b/main_package/classes/importer.py @@ -16,7 +16,7 @@ class Importer(): def __init__(self, files_path): self.files_path = files_path self.df_list = [] - self.trajectories = [] + #self.trajectories = [] def import_data_from_csv(self): """Importa tutti i file csv presenti nel path files_path in data_frame distinti. @@ -45,7 +45,9 @@ class Importer(): """ df['State'] = df[df.columns[2:]].apply(lambda row: ''.join(row.values.astype(str)), axis=1) - + def merge_value_columns_in_all_frames(self): + for data_frame in self.df_list: + self.merge_value_columns(data_frame) def get_data_frames(self): return self.df_list @@ -57,22 +59,26 @@ class Importer(): - def build_trajectories(self): + + + + + """def build_trajectories(self): for data_frame in self.df_list: self.merge_value_columns(data_frame) trajectory = data_frame[['Time','State']].to_numpy() self.trajectories.append(trajectory) #Clear the data_frame - data_frame = data_frame.iloc[0:0] + data_frame = data_frame.iloc[0:0]""" -imp = Importer("../data") -imp.import_data_from_csv() -imp.build_trajectories() -print(imp.trajectories[0]) +#imp = Importer("../data") +#imp.import_data_from_csv() +#imp.build_trajectories() +#print(imp.trajectories[0])