Questions tagged [ipywidgets]

IPython widgets for the Jupyter Notebook

Read the docs

ipywidgets on github

973 questions
4
votes
1 answer

How do I install the datepicker widget in ipywidgets?

It seems like I don't have the DatePicker widget which is pretty odd. I tried installing / unistalling ipywidgets but no luck. Any idea how to install it? import ipywidgets as ipyw ipyw.DatePicker # AttributeError: module 'ipywidgets' has no…
evan54
  • 3,585
  • 5
  • 34
  • 61
4
votes
1 answer

jupyter dropdown widget trigger action

I have a seemingly simple intention, just have a dropdown widget in jupyter notebook to trigger some simple action. It sort of works, but following script actually seems to trigger the event three times, what am I doing wrong? import ipywidgets as…
kakk11
  • 898
  • 8
  • 21
4
votes
1 answer

Obtaining values from ipywidgets.widgets.SelectMultiple

I am not able to get the values from a MultipleSelect widget after changing the initial selection. The selection looks fine, but the values do not show. The code to create the SelectMultiple widget: from ipywidgets import widgets from…
A7sharp11
  • 113
  • 1
  • 7
4
votes
1 answer

How to sort key names in ipywidgets interactive widgets (slider)?

I am trying to make interactive sliders with ipywidgets on jupyter notebook to change the data of a plot when a user changes a slider Widget, which is simple and we can find example codes easily. The problem that I have is twofold: 1) when there are…
4
votes
0 answers

How to speed up the execution of an IPython widget?

I created a widget using interact() in the Jupyter notebook which plots the data (see code below). However, the widget updates very slowly (around 1 fps) when I move the slider. Evaluation of the data inside the functions neg(T) and pos(T) takes…
4
votes
3 answers

Multiple interact() commands duplicate widgets in IPython

I am using an IPython Jupyter notebook. In the following situation, I call a function using interact(), which in turns calls a second function again using interact(). def fun1(dataset_id): dataset = read_dataset(dataset_id) interact(fun2,…
WindChimes
  • 2,955
  • 4
  • 25
  • 26
3
votes
2 answers

Ipywidgets interact function in google colab creates new plots instead of updating the desired plots

I recently created a plot using ipywidgets. The goal was to display data in a stacked barplot and to have two dropdown menus to select the start and end month for the plot, each bar representing data for one month. I was pretty happy with the result…
j42
  • 31
  • 3
3
votes
2 answers

Python - Dynamic selection of columns to new dataframe

I am looking for a solution to dynamically select two columns from a dataframe (using ipywidgets or steamlit for example) and create a new dataframe using that selection. The aim is to allow a user to select two columns from a larger dataset to…
Crimzo
  • 33
  • 4
3
votes
3 answers

How to use ipywidgets in jupyter-notebook without Internet

I have developed interactive application in python using jupyter notebook with ipywidgets and use voila to run the notebook. On my development system (with internet) I have the application working flawlessly. But on the system without internet the…
3
votes
2 answers

iPyWidgets FileUpload not working as I expect it

Im currently trying to load a file in my jupyter notebook, to read it's content. My Code: file = widgets.FileUpload( description= 'Title', accept='.csv', multiple=False, ) box = widgets.HBox([file]) display(box) # New…
user111
  • 43
  • 2
  • 6
3
votes
0 answers

React to ipywidget events while the cell is blocket in an `await` (using `%autoawait` magic)

I would like to wait to asynchronous jupyter widget events while the cell is blocked executing async code (thus, usually idle, waiting for I/O, utilising the %autowait magic). Unfortunately, the jupyter notebook does not seem to send any traitlet…
burnpanck
  • 1,955
  • 1
  • 12
  • 36
3
votes
1 answer

IPywidgets observe not working when wrapped inside a class

I have created a small example, which shows the working and not working case. The working example, import ipywidgets as widgets selected = {} a = widgets.Dropdown(description="Apple", options = ["a","k"]) b =…
Paisley
  • 81
  • 1
  • 8
3
votes
0 answers

Modify ipywidgets button text color

I'm trying to change the text color of a button widget in a jupyter notebook. According to the ipywidgets documentation the button widget has the following style attributes: ['_model_module', '_model_module_version', '_model_name', …
Sergio Manchado
  • 143
  • 1
  • 7
3
votes
1 answer

How to get any kind of interactive plot with ipywidgets and matplotlib

I am just looking for some kind of working example which will allow me to have a slider and a sine wave plot whereby I can vary the frequency in a Jupyter Notebook. All the online demos that I have Googled don't work for me. The issue seems to be…
Kiwiheretic
  • 308
  • 2
  • 12
3
votes
2 answers

Python ipywidgets ToggleButton Style Color

I want to change the button color of a ipywidget ToggleButton. In the docs it is described as: widgets.ToggleButtons( options=['Slow', 'Regular', 'Fast'], description='Speed:', disabled=False, button_style='', # 'success', 'info',…
TimoBe
  • 31
  • 1
  • 2