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 solution to this.
Below is my code snippet. Anything before was solely to get my data into the desired form for tabulation.
from IPython.display import display
from ipywidgets import widgets, interactive
v = interactive(by_q, quarter=(['q1y2015', 'q2y2015', 'q3y2015', 'q4y2015']), days=(1, 180))
display(v)
After googling for a while without hope, I realized that I need
With the new version of
ipywidgets
, I ran into this problem, but then I found on their github readme that you now need to followwith
That cleared the problem up for me.
I think plot.ly imports a function called
display
which overrides the functiondisplay
from ipython. Try changing the order of imports or simply import the function under a different nameMight have been a stupid mistake of mine, but in case you are using virtual environments, just keep properly in mind what is running from where.
You might properly run Jupyter from inside your current environment every time as needed, or might have a root env from which you always start the Jupyter you will end up using for all your environments.
For the latter case, what you need to be sure is to enable nbextension for the Jupyter you are actually running, instead of mistakenly run the command from within your currently active environment.