IPython widgets for the Jupyter Notebook
Questions tagged [ipywidgets]
973 questions
3
votes
1 answer
Jupyter Notebook Widgets: How to make "Filter As You Type" Textbox?
I'm trying to make a "filter as you type" textbox widget in my Jupyter Notebook in which if I write M it displays all players with "M"...if I type O after the M it displays players with "MO" in their name (e.g. MOHAMED SALAH AND MO SALAH) and so…

PythonDyson
- 45
- 1
- 6
3
votes
2 answers
How can I display a matplotlib Pie chart in an ipywidget out widget? I am using Jupyter Notebook, presently nothing gets displayed
My code result currently, but I want the Pie chart to show up under the Algo Tab
My code
out_algo = widgets.Output()
out_ht = widgets.Output()
outioi_trd = widgets.Output()
out_adv = widgets.Output()
out_fundexp = widgets.Output()
out_stratexp =…

Kaustav Chaudhuri
- 31
- 1
- 2
3
votes
0 answers
filter a pandas DataFrame with input data from ipywidget.Text and edit result in Jupyter with ipysheet
I have a pandas dataframe that I want to filter according to user data entered in a jupyter notebook.
The data should be entered with an ipywidget:
import ipywidgets as widgets
import ipysheet
csv_input =widgets.Text(
value='a,b,c,...',
…

JFerro
- 3,203
- 7
- 35
- 88
3
votes
1 answer
Jupyter Lab interactive image display : issue with widgets arrangements using HBox
I am trying to change content of an image interactively using a slider (e.g. for applying a threshold operation with different values).
My code is as follows:
#%matplotlib ipympl
%matplotlib widget
import matplotlib.pyplot as plt
import cv2
import…

Jacques Coeur
- 51
- 3
3
votes
0 answers
widget does not apears on jupyter notebook
i am trying to use the widget button, here is my code:
import ipywidgets as widgets
from IPython.display import display
button = widgets.Button(description='Hello')
display(button)
then in the output i get
Button(description='Hello',…

mimus
- 367
- 4
- 21
3
votes
2 answers
text wrapping in ipywidgets
I can't seem to get my widgets to wrap text.
This code:
import ipywidgets as widgets
test_layout = widgets.Layout(
border='1px solid black',
flex_flow = 'row wrap',
width = '200px')
test_string = 'test test test test test test test…

mnstoddard
- 63
- 5
3
votes
1 answer
ipywidgets clear_output() does not work the second time it's used
I am experiencing a weird behavior with the Output widget from ipywidgets. I replicate it with the below code in a jupyter notebook:
import ipywidgets as widgets
def clear_output():
change_output_button = widgets.Button(description="Change…

dj K
- 180
- 2
- 11
3
votes
2 answers
Jupyter with ipywidgets and plotly v4?
Using Jupyter from Anaconda install on Windows 10; also installed conda install -c plotly plotly, and apparently got Plotly v4.
I just want to start with a simple example - and use ipywidget sliders instead of Plotly ones. So, I've…

sdbbs
- 4,270
- 5
- 32
- 87
3
votes
1 answer
ImportError: cannot import name 'AppLayout' from 'ipywidgets'
While importing AppLayout I'm getting the following error. I am using Jupyter and have installed ipywidgets. The same error is being raised when importing GridspecLayout. Can anyone help me with this?
All other imports from ipywidgets are working…

anarz
- 209
- 4
- 11
3
votes
1 answer
How to lazify output in Tabbed Layout in jupyter notebook?
I want to create a tabbed layout in jupyter notebook using ipywidgets. I want to process the output of a particular tab only when it is clicked. In other words, lazify the output.
from ipywidgets import widgets
out1 = widgets.Output()
with out1:
…

Govinda Totla
- 576
- 6
- 19
3
votes
2 answers
Using interact from ipywidgets with a dataframe
i am new to ipywidgets and trying to use the interactfrom this library in combination with a dataframe. My dataframe is:
df
KundenNR Kundengruppe Wertpapierart Erlös Kosten A Kosten B
1 1 A 100 30 10
1 1 B 200 30 …

PV8
- 5,799
- 7
- 43
- 87
3
votes
1 answer
Jupyter notebook download button
I'm trying to implement a download button in jupyter notebook (IPython). I know that button widget do exists in jupyter like below.
from ipywidgets import Button
...
btn_download = widgets.Button(
description='Download',
button_style='', #…

Darren Christopher
- 3,893
- 4
- 20
- 37
3
votes
1 answer
ipywidgets compatible with Jupyter Lab version 1.0+?
I want to use the pre-release Jupyter Lab version 1.0+. I have a Pipfile that looks like this:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[packages]
ipywidgets = "*"
jupyterlab =…

Dustin Michels
- 2,951
- 2
- 19
- 31
3
votes
1 answer
How to create a toogle button to show and clear output using ipywidgets?
I want to create a toggle button to display some output and clear it when switched in jupyter notebook using ipywidget.
I tried to do it using widgets.Output(). This however displays empty lines as I click more and more times.
Please help me…

Govinda Totla
- 576
- 6
- 19
3
votes
2 answers
How do I make a table with clickable cells in jupyter notebook?
I have a table and a plot below, I need to make the plot to be updated whenever a table cell is clicked.
ipywidgets library doesn't have a dedicated table widget.
qgrid doesn't have a callback for cell selection, only for row selection (I suspect I…

Antony Hatchkins
- 31,947
- 10
- 111
- 111