nce that’s done, you can address the rows where mol is ‘None’ …
From: Mike Mazanetz
Sent: Thursday, October 31, 2019 8:54 AM
To: 'Fiorella Ruggiu'
Cc: 'RDKit Discuss'
Subject: Re: [Rdkit-discuss] failed mols in converting SMILES to Pandas
dataframe Molecule
Hi Fio,
Than
Jensen ; RDKit Discuss
Subject: Re: [Rdkit-discuss] failed mols in converting SMILES to Pandas
dataframe Molecule
Hello Mike,
you could create a function with your if else structure and use apply on the
pandas dataframe. For example, if you have a SMILES column in your df:
def addMol
Hello Mike,
you could create a function with your if else structure and use apply on
the pandas dataframe. For example, if you have a SMILES column in your df:
def addMol(smiles):
if Chem.MolFromSmiles(smiles) is None:
Etc
return None # or whatever you wish
Dear RDKit’ers
I’ve been trying to skip failed molecules in
PandasTools.AddMoleculeColumnToFrame.
This is possible if I chuck each row to a different processor, but what I
really want to do is return a missing row entry.
Normally I’d go:
If mol is None:
Etc
Else:
4 matches
Mail list logo