Hani Park commited on
Commit
fe9b7a0
·
1 Parent(s): 221bf26

Fixed the ColloidalAggregators number of compounds

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. correct_dtype.py +18 -0
README.md CHANGED
@@ -33,7 +33,7 @@ This dataset collection contains ~200K curated Active compound lists from ~90 di
33
  | Absorbance | 1486 |
34
  | Artifact | 10952 |
35
  | Autofluoresence | 32054 |
36
- | ColloidalAggregators | 19533 |
37
  | HeavyHitters | 71981 |
38
  | LuciferaseInhibition | 32831 |
39
  | Misannotation | 39 |
 
33
  | Absorbance | 1486 |
34
  | Artifact | 10952 |
35
  | Autofluoresence | 32054 |
36
+ | ColloidalAggregators | 19553 |
37
  | HeavyHitters | 71981 |
38
  | LuciferaseInhibition | 32831 |
39
  | Misannotation | 39 |
correct_dtype.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import csv
3
+ from pathlib import Path
4
+
5
+ data_dir = Path("./data")
6
+
7
+ for csv_file in data_dir.glob("*.csv"):
8
+ print(f"Fixing {csv_file.name}")
9
+ df = pd.read_csv(csv_file)
10
+
11
+ df["Type"] = df["Type"].fillna("").astype(str)
12
+ df["DatasetName"] = df["DatasetName"].fillna("").astype(str)
13
+ df["ID"] = df["ID"].fillna("").astype(str)
14
+ df["IDType"] = df["IDType"].fillna("").astype(str)
15
+ df["SMILES"] = df["SMILES"].fillna("").astype(str)
16
+ df["AID"] = pd.to_numeric(df["AID"], errors="coerce").astype("Int64")
17
+
18
+ df.to_csv(csv_file, index=False, quoting=csv.QUOTE_NONNUMERIC)