Answers.Body: <p>It is easily done with RDKit:</p>
  <pre><code>from rdkit.Chem import PandasTools
  
  fn = '/mypath/dataset.sdf'
  
  df = PandasTools.LoadSDF(fn, embedProps=True, molColName=None, smilesName='smiles')
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T00:22:57.377Z
Answers.LastActivityDate: 2021-02-05T00:22:57.377Z
Answers.UserDisplayName: Soerendip
Body: <p>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.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-05T00:13:39.777Z
Comments.Text: Please provide a small example file
Comments.UserDisplayName: Liam McIntyre
Tags: <python><rdkit>
Title: How to convert a SDF molecular structure file to a pandas dataframe with Python?
ThreadText: # How to convert a SDF molecular structure file to a pandas dataframe with Python?
  
  (Asked by: username_0 on 2021-02-04)
  
  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.
  
  **Tags:** python, rdkit
  
  > **Comments:**
  > **username_1**: Please provide a small example file  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-02-05. Score: 2 | Accepted 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')
  
  ```
  
  
  ---
  
  