changeset 375:86eab2646c3e draft

Uploaded
author bimib
date Thu, 07 Nov 2024 10:10:02 +0000
parents d900ed89e338
children 46b80234a46f
files marea_2/marea_cluster.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/marea_2/marea_cluster.py	Thu Nov 07 10:04:05 2024 +0000
+++ b/marea_2/marea_cluster.py	Thu Nov 07 10:10:02 2024 +0000
@@ -135,7 +135,7 @@
     return dataset
 
 ############################ rewrite_input ###################################
-def rewrite_input(dataset :pd.DataFrame) -> Dict[str, List[Optional[float]]]:
+def rewrite_input(dataset :Dict) -> Dict[str, List[Optional[float]]]:
     """
     Rewrite the dataset as a dictionary of lists instead of as a dictionary of dictionaries.
 
@@ -147,7 +147,6 @@
     """
     #Riscrivo il dataset come dizionario di liste, 
     #non come dizionario di dizionari
-    dataset = dataset.iloc[:, 1:]
     #dataset.pop('Reactions', None)
     
     for key, val in dataset.items():
@@ -506,6 +505,7 @@
     #Data read
     
     X = read_dataset(args.input)
+    X = X.iloc[:, 1:]
     X = pd.DataFrame.to_dict(X, orient='list')
     X = rewrite_input(X)
     X = pd.DataFrame.from_dict(X, orient = 'index')