IPython widgets for the Jupyter Notebook
Questions tagged [ipywidgets]
973 questions
0
votes
1 answer
Converting matplotlib chart to interactive chart in Jupyter
I have a Matplotlib stacked bar plot -
df.groupby(['date', 'flavor'])['minutes'].sum().unstack().plot(kind='bar', stacked=True)
I would like to convert this to an interactive plot using interact from ipywidgets. But, when I try this -…

harry04
- 900
- 2
- 9
- 21
0
votes
1 answer
WidgetRegistry object has no attribute values
When I am using Python Widgets with the following code as described in the documentation https://test-widgets.readthedocs.io/en/latest/examples/Widget%20List.html:
import ipywidgets as widgets
widgets.Widget.widget_types.values()
Then the following…

Rene B.
- 6,557
- 7
- 46
- 72
0
votes
1 answer
Query result won't display as pandas dataframe but can be displayed with print()?
I want to create a search box that will get input from user, put it into an SQL query, and return matching records from the queried database.
Everything seems to work just fine - except I can't display my query results as a Pandas dataframe. The…

gooseberry
- 26
- 5
0
votes
1 answer
How to reach the key object in a defined dropdown menu in IPywidgets
Currently I am working on a pretty major data project. I use the database query to reach for all the important data. I am using one of the tables to create a dropdown menu which would allow me to further process and visualize. The widget itself is…

Kaszanas
- 446
- 4
- 18
0
votes
1 answer
Create interactive plot by IPywidgets in Jupyter notebook
I am trying to create an interactive bar plot.
I have the following dataframe:
CustID| Age |Gender|Smoking_history |Alcohol_history
1 |18-24| M | Non-smoker | <21 units per week
2 |43-48| F | Non-smoker | …

studentcoder
- 75
- 8
0
votes
1 answer
Assigning a checkbox to each row in a pandas df using ipywidgets
I have a pandas df and I am trying to assign a separate checkbox using ipywidgets to each row of the dataframe. I am creating a jupyterlab UI and my end goal is for a user to be able to look through the table, select true or false on the records…

Nicolas Klebusits
- 55
- 10
0
votes
0 answers
How can I get the values of my widget items to display in a TextArea and convert the values to dictionary
I am creating a post form that will send my input as dictionary to a server. I planned to display the user entered input in a TextArea with my first display button click. This display button sets the next button (Send) to be visible. The Send button…

Stringz
- 43
- 1
- 1
- 8
0
votes
2 answers
Get ipywidget button within a class to access class parameters through self?
I am writing a class that I want to include multiple widgets that can be displayed in a Jupyter notebook. These widgets should calls class methods that update class parameters. A function that I connect to an ipywidget's events need access to the…

astrokeat
- 78
- 1
- 7
0
votes
1 answer
How to use FabricJS in Jupyter Notebook widget
I'm trying to build a widget in Jupyter Notebook that uses Fabric.js (http://fabricjs.com/), however I'm getting an error that is a blocker for me. The most basic solution I need is just to make the widget output a canvas with an interactive red…

Nic Scozzaro
- 6,651
- 3
- 42
- 46
0
votes
2 answers
Trying to plot plotyly graphs using value from dropdown menu in jupyter notebook
So I have stock prices of 5 companies. What I am trying to do is use a dropdown menu to select the company and create a line plot using data for the company selected from the dropdown menu. The code I have so far is as below :
import pandas as…

Stevi G
- 257
- 1
- 4
- 13
0
votes
2 answers
Custom formatting for ipywidgets IntSlider
I'm working on an interactive graph. One of the options is to select the number of rooms for a house. Right now, if you input any number above 5 in the n_rooms argument, the graph will always show data for houses that have 5 or more rooms. So I…

Juan C
- 5,846
- 2
- 17
- 51
0
votes
2 answers
tweak layout for jupyter widget output
The code below enables a user to interactively display successive plots.
I wish to hide the title "Figure 1" and its gray box from this figure.
I read this guide but doesn't find the answer.
import ipywidgets as widgets
from IPython.display import…

Brigitte Maillère
- 847
- 1
- 9
- 27
0
votes
3 answers
Monospace in ipywidgets.Textarea?
how could I get my widgets to use monospace fonts?
from ipywidgets import Textarea
Textarea('The world is bigger than you.')
I want to show some table style data.

Soerendip
- 7,684
- 15
- 61
- 128
0
votes
2 answers
How to use a string as a function parameter in Python and have variable number of parameters
I have a function called filter that accepts a number of parameters in the format name=value. I have 2 lists: names and values (let's call them x and y), I need to be able to pass these into the function.
When I just pass in the string as in the…

Supez38
- 329
- 1
- 3
- 16
0
votes
1 answer
Generic class for jupyter widgets
I'm attempting to create a class to easily create and generate jupyter widgets for dashboards in my notebooks. This class so far has an add_row and display method. I'm having trouble finding a way to easily pass parameters to the widget object as…

Supez38
- 329
- 1
- 3
- 16