PerspectiveWidget - datagrid column width

Viewed 14

Using perspective version 0.10.2, please would you confirm how to set the datagrid column width?

Unfortunately, this method is not adjusting the column width:


import ipywidgets as widgets
import perspective
import pandas as pd
from Python import display

df = pd.Dataframe({"a": [1.11111,-2.11111,3.11111], "b":[-4.11111,5.11111,-6.11111],"c": [7.11111,-8.11111,9.11111]})
pvt = perspective.PerspectiveWidget(df, columns=["a", "b"])

#pvt.plugin_config = { c: {"fixed": 10} for c in ["a","b"] }
pvt.plugin_config = {c: {"column_size_override": 400} for c in ["a","b"] }

display.display(widgets.HBox([pvt]))


Many thanks.

0 Answers
Related