question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Selection1D with the source of hv.Table do not receive the selected indices

See original GitHub issue

Hi, I’m trying to use a linked stream Selection1D to get the indices of selected rows from a hv.Table object.

df = pd.DataFrame(np.random.rand(100,3), columns=['1','2','3'])

table = hv.Table(data=df)
sel = hv.streams.Selection1D(source=table)
table

but sel.contents always return {'index': []} even when some rows are selected on the table.

image (There are two tables shown because I’m opening two notebook views in the Jupyterlab)

While trying to figure it out, I opened up a new notebook, and simply tried

import holoviews as hv
hv.Curve([1,2,3])

and now the plot is not being displayed… image

Could you help me figure out what may be causing these? Could they be related somehow?

Thank you!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
youngsajcommented, Aug 20, 2019

I’m unfortunately just now experiencing this after updated to the latest (conda-forge) param 1.9.1, bokeh 1.3.4, hv 1.12.5, jupyter lab 1.0.5, pyviz_comms 0.7.2, jupyter lab @pyviz/jupyterlab_pyviz 0.8. I did have an awful time getting jupyter lab updated to work with special npm server on air gapped network, but libraries are loading and holoviews tables are displaying. The very thing above is happening no index when selected.

0reactions
youngsajcommented, Aug 21, 2019

A fresh environment based on holoviz, along with jupyterlab, jupyter install labextension @pyviz/jupyterlab_pyviz, and intake solved the problem for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selection1D with the source of hv.Table do not ... - GitHub
Hi, I'm trying to use a linked stream Selection1D to get the indices of selected rows from a hv.Table object. df = pd....
Read more >
Dynamically fetch other column value from selection1D stream
It seems holoviews table does not let there be a custom index in the table ... hv.extension('bokeh') from holoviews.streams import Stream, ...
Read more >
pyviz/pyviz - Gitter
Couldn't find a way to find the selected sample, since the 'y' kdim is grouped, and the Selection1D index returns the data.select(y=y) set....
Read more >
Is it possible to pass streams.Selection1D value to ipywidgets?
I need to visualize selected items streams.Selection1D() from hv.Nodes() stream - on some kind of Label or TextArea - not on DynamicMap ...
Read more >
HoloViews | Dash for R Documentation | Plotly
HoloViews Overview. HoloViews is an ambitious project that aims to provide a flexible grammar of visualization types and plot interactions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found