<jupyter_start><jupyter_text>The next bit of code is a workaround to circumvent the broken Molrendering caused by changes in [Pandas v0.25.x](https://github.com/rdkit/rdkit/issues/2673).<jupyter_code>PandasTools.RenderImagesInAllDataFrames(images=True)

from IPython.core.display import HTML

def show(df):
    return HTML(df.to_html(notebook=True))
mydf = pd.read_pickle('58_molobj.pkl')
show(mydf.head())
query = Chem.MolFromSmiles('c1ccncc1')
query
hits = mydf[mydf['mol'] >= query]
hits.shape
show(hits.head())
PandasTools.WriteSDF(hits, 'substruct_hits.sdf', molColName='mol', idName='molport_id')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13924050632911392, 'fraction_numerical': 0.01740506329113924, 'mean_word_length': 7.554054054054054, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '399817', 'license': 'MIT', 'n_tokens_mistral': 257, 'n_tokens_neox': 245, 'n_words': 42, 'path': 'substructure_search.ipynb', 'repo_name': 'hellerm2/dbase_search', 'size': '632'}