Skip to content

Commit

Permalink
Calculator.pandas: use source index
Browse files Browse the repository at this point in the history
  • Loading branch information
philopon committed Aug 16, 2017
1 parent 2170e46 commit e2083f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mordred/_base/calculator.py
Expand Up @@ -340,9 +340,15 @@ def pandas(self, mols, nproc=None, nmols=None, quiet=False, ipynb=False, id=-1):
"""
import pandas

if isinstance(mols, pandas.Series):
index = mols.index
else:
index = None

return pandas.DataFrame(
(list(r) for r in self.map(mols, nproc, nmols, quiet, ipynb, id)),
columns=[str(d) for d in self.descriptors],
index=index,
)


Expand Down

0 comments on commit e2083f0

Please sign in to comment.