I’d been using AddMoleculeColumnToFrame on Google Colab with no problem. After not using it for about 1 month I just discovered that it stopped working, i.e. the images are not showing up in the data frame (see below).
Any ideas? The most likely explanation is that something changed on Google Colab. But could it also be that a new version of Pandas is causing the problem?
Here’s the link to the notebook and a screenshot.
https://colab.research.google.com/drive/1nQPmdEbYQgVsFr7c44yRd3wpXPEsJar3
Seems like this is a problem with all pandas versions above 0.25.0, So I guess for now the easiest fix is to downgrade pandas. Or you can use this method which seemed to work for me:
from IPython.display import HTML
HTML(df.to_html())
https://colab.research.google.com/drive/1eP8VZdr61DIoYXRz3PfwmVeG71GRzsRG
I am not quite sure why but this also seems to work:
def display_mol(x):
if isinstance(x, Mol):
return x
return x
df.style.format(display_mol)