我想您必须将整个pandas对象表示为html对象,即
In [1]: from IPython.display import HTMLIn [2]: df = pd.Dataframe(list(range(5)), columns=['a'])In [3]: df['a'] = df['a'].apply(lambda x: '<a href="http://example.com/{0}">link</a>'.format(x))In [4]: HTML(df.to_html(escape=False))抱歉,现在没有IPython,也无法检查输出是否正确。



