changeset 58:42a8ccae86cd draft

Uploaded
author luca_milaz
date Sun, 13 Oct 2024 06:56:10 +0000
parents 0b4be1dbdbc4
children d4162562c8f5
files COBRAxy/ras_to_bounds.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/COBRAxy/ras_to_bounds.py	Sun Oct 13 06:52:58 2024 +0000
+++ b/COBRAxy/ras_to_bounds.py	Sun Oct 13 06:56:10 2024 +0000
@@ -232,7 +232,8 @@
             ras = ras.astype(float)
             ras_list.append(ras)
             for patient_id in ras.index:
-                class_assignments = class_assignments.append({"Patient_ID": patient_id, "Class": ras_class_name}, ignore_index=True)
+                class_assignments = pd.concat([class_assignments, pd.DataFrame({"Patient_ID": ras.index, "Class": ras_class_name})])
+        
         
         # Concatenate all ras DataFrames into a single DataFrame
         ras_combined = pd.concat(ras_list, axis=1)