Skip to content

Commit

Permalink
use non regex separator when parsing demerits lilly output since newe…
Browse files Browse the repository at this point in the history
…st pandas uses C/PyArrow engine for CSV parser by default. fix #15
  • Loading branch information
hadim committed Sep 18, 2023
1 parent 8fccc8c commit 7ac7da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion medchem/structural/lilly_demerits/_lilly.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def parse_output(rowlist):
]
)
flux = io.StringIO(content)
df = pd.read_csv(flux, sep=r"\s+", doublequote=True, names=["smiles", "ID", "reasons"])
df = pd.read_csv(flux, sep=" ", doublequote=True, names=["smiles", "ID", "reasons"])
df["ID"] = pd.to_numeric(df["ID"])
df["reasons"] = df["reasons"].apply(lambda x: x.strip("'") if x and isinstance(x, str) else x)
return df
Expand Down

0 comments on commit 7ac7da0

Please sign in to comment.