79133465

Date: 2024-10-28 12:52:51
Score: 1
Natty:
Report link

Why not just use the apply function?:

df["ROMol"] = df[args.smi_column].apply(lambda x: pybel.readstring("smi", x))

Not only is it cleaner but should also be more efficient.

If you are not constrained to using pybel, RDKit has utility functions to do exactly what you want.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Why not
Posted by: Oliver Scott