Re: [Rdkit-discuss] failed mols in converting SMILES to Pandas dataframe Molecule

2019-10-31 Thread Markus Heller
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, Thanks for the tips. I’ve found that I need

Re: [Rdkit-discuss] failed mols in converting SMILES to Pandas dataframe Molecule

2019-10-31 Thread Mike Mazanetz
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

Re: [Rdkit-discuss] failed mols in converting SMILES to Pandas dataframe Molecule

2019-10-31 Thread Fiorella Ruggiu
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

[Rdkit-discuss] failed mols in converting SMILES to Pandas dataframe Molecule

2019-10-31 Thread Mike Mazanetz
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: