ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

Output with traitlets class only update once in jupyterlab

Open CnBDM-Su opened this issue 1 year ago • 0 comments

What I am doing is like this, I want to display the data where I select. image

The selected data is oberved and stored in a traitlets class well. However, it cannot display well in widgets.Output()

@data_output.capture() def show_dataframe(change): if change is not None: tmp_frame = data_frame.iloc[change['new']][:10] clear_output() display(tmp_frame, display_id=99) js2py_memory.observe(show_dataframe, names=["data"])

If I display the result in a new cell instead of in widgets.Output(), it works well. image

Is there any way I can put the result in Output? Because I want to put both table and plot in single cell. If Output cannot realize this, is there other way?

Thanks

CnBDM-Su avatar Feb 22 '24 14:02 CnBDM-Su