如何完全显示多列的全息图 table

How to display holoviews table with many columns completely

我有一些包含很多列的 DataFrame。当我尝试使用 holoviews.Table 可视化它们时,只显示第一列。

出于测试目的,我创建了一个包含 50 列的 DataFrame。

import pandas as pd
import panel as pn
import holoviews as hv
pn.extension()

df = pd.DataFrame({'1': [1]})
for i in list(range(2, 50)):
    df[str(i)] = [i]
df

我尝试将 DataFrame 显示为 Table:

table= hv.Table(df, label='displayed table is node wide enough')
pn.Row(table)

是否有一些选项/方式来显示完整的 table?

选项width是解决方案:

table.opts(width=1550)
pn.Row(table)

显示具有正确宽度的 table 以显示所有列。