What is the best python tool to convert a SDF file to a structured data frame (pandas.DataFrame). Similar to Molconvert from ChemAxon? SDF can have different datafields for each compound which I would like to have in a dataframe. The 2D or 3D structures can be disregarded.
1 Answer
It is easily done with RDKit:
from rdkit.Chem import PandasTools
fn = '/mypath/dataset.sdf'
df = PandasTools.LoadSDF(fn, embedProps=True, molColName=None, smilesName='smiles')