holoviz / holoviz/hvplot

Can't use select widget to update interactive table

Open
#684 3 comments 0 reactions 0 assignees View on GitHub
api: interactive
Dominant language
Python
Stars
1.4k
Forks
124
Avg merge
1d 18h
Merged PRs (30d)
1

Description

Software (anaconda in windows 10/11):
panel: 0.12.4
holoviews: 1.14.6
hvplot: 0.7.3
python: 3.9.7

I'm trying to use the select widget to choose which column appears in an interactive table. This works when returning a dataframe:

```Python
import panel as pn
from bokeh.sampledata.autompg import autompg
pn.extension()

s = pn.widgets.Select(options=list(autompg.columns))
def t(col1): return autompg[[col1,'cyl']]

pn.Column(s, pn.bind(t, col1=s))
```

But not for an interactive table:

```Python
import panel as pn, hvplot.pandas
from bokeh.sampledata.autompg import autompg
pn.extension()

s = pn.widgets.Select(options=list(autompg.columns))
autompg = autompg.interactive()
def t(col1): return autompg[[col1,'cyl']]

pn.Column(s, pn.bind(t, col1=s))
```

The reason I'm using the latter is because I also want to combine it linked selections as described [here](https://discourse.holoviz.org/t/combine-plots-and-tables-with-linked-selection-and-data-source-selection-by-widget/3003/2).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.