避免在 Jupyter Notebook 下显示 table 排序箭头

Avoid displaying table sorting arrows under Jupyter Notebook

我需要显示单行数据框:

import pandas as pd
from IPython.display import display, HTML

stack = [42, 27, 13]
df = pd.DataFrame([stack], columns=[1, 2, 3], index=["stack"])
display(HTML(df.to_html())) # or simply: display(df)

是否可以去掉在这里没用的排序箭头?

基于我们在评论中的讨论。您的系统上安装了 Jupyter 扩展(名为 table_beautifier)。

禁用它应该会得到预期的结果(没有排序箭头)。