IPython widgets for the Jupyter Notebook
Questions tagged [ipywidgets]
973 questions
0
votes
1 answer
Using bqplot tooltip with a dataframe
Use widget to display snippets from a csv file/dataframe and feed to tooltip attribute of bqplot
I am trying to display certain info (statistics such as age group, income, obesity levels etc.) for each state in the US using bqplot. I am able to plot…

DolphinB
- 5
- 4
0
votes
0 answers
Using ipywidgets to make a unit converter
I have an assignment to use ipywidgets and the inputs value.value, convertFrom.value, and convertTo.value in Jupyter to convert any unit into another unit without building an "internal two-dimensional table structure of the conversion of every unit…
0
votes
0 answers
horizontal alignment of options in ipywidgets
How to align items horizontally in multi-select menu?
Currently this gives me a vertical alignment of options:
widgets.SelectMultiple(options=['option-1','option-2', 'option-3', 'option-4', 'option-5'],
rows=5,…

YetAnotherBot
- 1,937
- 2
- 25
- 32
0
votes
0 answers
updating hist2d plot via ipywidgets.interact is not working
Edit: I put in the required dataframe so that the issue is reproducible.
Sorry for the long excerpt of code, this is what I have on jupyter.
You can scroll to the very bottom and look for draw_plots() which works fine, and draws a matrix of hist2d…

user2677285
- 313
- 1
- 7
0
votes
1 answer
ipysheet question about update cell attribute
My code here
import ipysheet
mysheet = ipysheet.sheet(rows=2, columns=2)
mysheet
c = cell(0,0,1, background_color = 'red')
I want to change background_color, I expect to do something like this
c.background_color = 'yellow'
Or later
mysheet[0,…

Ke Zhang
- 937
- 1
- 10
- 24
0
votes
1 answer
How to merge Dynamic Dataframes
I'm looking for help to add two dynamically generated dataframes.
Both DataFrames have a column computed on input from an intslider ipywidget.
the third Dataframe should update dynamically on changes of any of above Dataframes
import pandas as…

Stefan Spycher
- 3
- 1
0
votes
2 answers
How to build a simple widget or app in jupyter notebook/lab to interactively extract a substring from text?
I want iterate over a list of string, output the string as plain text in jupyter lab then interactively highlight a substring to get easily the start index of the substring and the length. The goal is to do a quick annotation of text and get the…

cookiemonster
- 1,315
- 12
- 19
0
votes
1 answer
How to install a nbextension with python and js components as a labextension
I created a nb extension following this link!. The extension works correctly when ran from:
jupyter notebook
When I ran the same extension from
jupyter lab
The extension does not work and gives me an error:
Error displaying widget: model not…

Anil
- 57
- 9
0
votes
1 answer
IPython nbwidgets: Toggle Visiblity by button click
I'm using the ToggleButton and want to link it's value to the visilbiity of another widget.
I've come accross the Widget Events, but it is unclear to me how to bind the style property of the other widget to the value of the ToggleButton.
Has anyone…

Simon
- 5,464
- 6
- 49
- 85
0
votes
1 answer
ipywidgets.VBox not showing once part of function
I try to create an interactive dashboard using ipywidgets. (ipywidgets version 7.5.0, python version 3.7.2)
In a single batch of code, the widgets.VBox() shows automatically. But once I outsource the statement to a function, the widgets.VBox() does…

nostalghia
- 15
- 1
- 6
0
votes
1 answer
Add HBox to VBox using Button after creation
I am trying to make an input widget for a module i have made.
The input widget should have a title bar and a variable number of input lines below. I had in mind to have an add button which should add a line directly below the title line.
I have…

Kim Petersen
- 199
- 1
- 7
0
votes
1 answer
How do I add selected items from combo box to a table in Jupyter widgets?
I have been trying to add items to my table using the selected item on combo box when I press the add button. Also the way I do it right now gives a faulty result that is being upside/down..
I tried multiple things but none worked. I can link the…

Enjinia
- 1
0
votes
1 answer
How to call a function with parameter by multiple buttons
I create many buttons in my script.
I need to call a function by these buttons.
But the function is working only in the very last button.
What is wrong?
import ipywidgets as widgets
from IPython.core.display import display, HTML
def fn(b):
…

Marcin Malinowski
- 23
- 4
0
votes
0 answers
How do I close pyplot windows and display new ones when a widget button is pressed?
I have some code that generates an interactive display. One plot is seen in a "magnified display," and several other plots are seen below:
https://i.stack.imgur.com/eydU7.png
When I press the "apply to all" button, I want to update the graphs in…

obro39
- 11
- 3
0
votes
1 answer
Why cant I pass a python variable to a jupyter magic function?
I am trying to create a widget button that will collect the values of other widgets and then use %run to execute another notebook with those values. I am using %store to pass the values but it does not recognize the python variable with the value…

Alex Brown
- 51
- 3