ipywidgets

ipywidgets: Update one widget based on results from another

别等时光非礼了梦想. 提交于 2019-11-30 14:20:38
I am using widgets in IPython that allows the user to repeatedly search for a phrase and see the results (different titles) in another widget (a selection widget) and then select one of the results. In short: search_text = widgets.Text(description = 'Search') search_result = widgets.Select(description = 'Select table') def search_action(sender): phrase = search_text.value df = search(phrase) # A function that returns the results in a pandas df titles = df['title'].tolist() search_result.options = titles search_text.on_submit(search_action) This used to work fine, but after updating to the

IPython Notebook ipywidgets does not show

我的未来我决定 提交于 2019-11-30 11:37:26
问题 I created a table with an interactive slider that allows me to toggle between different periods on my table. It was working for the past few days, until today, when I re-ran the notebook, the slide bar doesn't show anymore. No error messages appear. The code seem to run just fine, as the table appears, but the slide bar just doesn't appear. I didn't change my code either, as I was working on a separate part of my notebook. I tried many approaches, including searching in this space but was

Jupyter: embed live interactive widgets

怎甘沉沦 提交于 2019-11-30 02:18:57
问题 According to the Jupyter blog here, it is now possible to embed interactive widgets in a static webpage: Live interactive widgets can now be embedded into static web pages or blogs by inserting an html snippet containing the serialized widget state. This also works with custom widget libraries. See http://jupyter.org/embed-jupyter-widgets.html. When I open the example above, in firefox or chrome, I get the interactive widgets alright! However, if I create a new notebook with the same bit of

IPython Notebook ipywidgets does not show

江枫思渺然 提交于 2019-11-29 23:42:14
I created a table with an interactive slider that allows me to toggle between different periods on my table. It was working for the past few days, until today, when I re-ran the notebook, the slide bar doesn't show anymore. No error messages appear. The code seem to run just fine, as the table appears, but the slide bar just doesn't appear. I didn't change my code either, as I was working on a separate part of my notebook. I tried many approaches, including searching in this space but was still unable to come up with a solution. I was wondering if anyone faced a similar issue, and have any

How to get ipywidgets working in Jupyter Lab?

笑着哭i 提交于 2019-11-29 21:22:07
In Jupyter Notebook, ipywidgets work fine, however they seem to not work in Jupyter Lab (which is supposedly better than Notebook). I followed these directions . Step 1: Installed Node.js ( https://nodejs.org/en/ ) Step 2: Installed requirements on Python 3 with conda: conda install -c conda-forge ipywidgets jupyter labextension install @jupyter-widgets/jupyterlab-manager Unfortunately, basic widgets do not work inside the jupyter lab notebook: JupyterLab now prefers a model where arbitrary javascript is no longer allowed to be embedded in a cell's output, which is how many interactive Jupyter