@@ -27,7 +27,7 @@ def create_database_from_df(
27
27
yield_column : str = "YIELD" ,
28
28
ref_column : str = "REF"
29
29
) -> pd .DataFrame :
30
- all_cols = [solvent_column , reagent_column , catalyst_column , yield_column , ref_column ]
30
+ all_cols = ["SOLVENT" , "REAGENT" , "CATALYST" , "YIELD" , "REF" ]
31
31
df_protocol = df .rename (columns = {reaction_column : "REACTION" ,
32
32
solvent_column : "SOLVENT" ,
33
33
reagent_column : "REAGENT" ,
@@ -36,7 +36,8 @@ def create_database_from_df(
36
36
ref_column : "REF" })
37
37
for col in all_cols :
38
38
if col not in df_protocol .keys ():
39
- df_protocol [col ] = ""
39
+ df_protocol [col ] = "not-reported"
40
+
40
41
df , skipped_reactions = analyze_reactions (df_protocol )
41
42
self .df = df
42
43
self .skipped_reactions = skipped_reactions
@@ -56,7 +57,7 @@ def create_database_from_csv(
56
57
ref_column : str = "REF"
57
58
) -> pd .DataFrame :
58
59
df_csv = pd .read_csv (fname , index_col = None )
59
- all_cols = [solvent_column , reagent_column , catalyst_column , yield_column , ref_column ]
60
+ all_cols = ["SOLVENT" , "REAGENT" , "CATALYST" , "YIELD" , "REF" ]
60
61
df_protocol = df_csv .rename (columns = {reaction_column : "REACTION" ,
61
62
solvent_column : "SOLVENT" ,
62
63
reagent_column : "REAGENT" ,
@@ -65,7 +66,8 @@ def create_database_from_csv(
65
66
ref_column : "REF" })
66
67
for col in all_cols :
67
68
if col not in df_protocol .keys ():
68
- df_protocol [col ] = ""
69
+ df_protocol [col ] = "not-reported"
70
+
69
71
df , skipped_reactions = analyze_reactions (df_protocol )
70
72
self .df = df
71
73
self .skipped_reactions = skipped_reactions
0 commit comments