Explorar o código

Update preprocessing

Ali Bellamine %!s(int64=2) %!d(string=hai) anos
pai
achega
2a7b105b14
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      bop_scripts/preprocessing.py

+ 3 - 1
bop_scripts/preprocessing.py

@@ -164,7 +164,9 @@ def generate_labels_dataset(database, lab_dictionnary):
     lab_dictionnary_list = [str(x) for x in lab_dictionnary.keys()]
 
     ## Let's create an index to speed up queries
-    conn.execute("CREATE INDEX IF NOT EXISTS biological_index ON labevents (stay_id, itemid)")
+    curs = conn.cursor()
+    curs.execute("CREATE INDEX IF NOT EXISTS biological_index ON labevents (stay_id, itemid)")
+    curs.close()
 
     # 1. Generating features