# HG changeset patch # User bimib # Date 1730974202 0 # Node ID 86eab2646c3e4519122542178ce5dc28922483f6 # Parent d900ed89e3384ed5f5e33eedb71021dc588827cc Uploaded diff -r d900ed89e338 -r 86eab2646c3e marea_2/marea_cluster.py --- 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')