Spaces:
Running
Running
Update smiles_cor.py
Browse files- smiles_cor.py +12 -11
smiles_cor.py
CHANGED
@@ -1286,15 +1286,16 @@ class smi_correct(object):
|
|
1286 |
|
1287 |
df_output["SMILES"] = df_output.apply(lambda row: self.standardization_pipeline(row["CORRECT"]), axis=1)
|
1288 |
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
|
|
1300 |
return df_output
|
|
|
1286 |
|
1287 |
df_output["SMILES"] = df_output.apply(lambda row: self.standardization_pipeline(row["CORRECT"]), axis=1)
|
1288 |
|
1289 |
+
df_output = self.remove_smiles_duplicates(df_output, subset="SMILES")
|
1290 |
+
|
1291 |
+
# List of columns to drop
|
1292 |
+
columns_to_drop = ["CORRECT", "ORIGINAL"]
|
1293 |
+
|
1294 |
+
# Check if "INCORRECT" column exists and add it to the list
|
1295 |
+
if "INCORRECT" in df_output.columns:
|
1296 |
+
columns_to_drop.append("INCORRECT")
|
1297 |
+
|
1298 |
+
# Drop the specified columns
|
1299 |
+
df_output = df_output.drop(columns=columns_to_drop).dropna()
|
1300 |
+
|
1301 |
return df_output
|