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)
by_q
to make a complete example? Normally you don't even need to assigninteractive
to a variable and then calldisplay(v)
. – Bondsinteract
a couple of days ago... unfortunately it disappeared as mysteriously as it appeared. I don't have a solution for it. Perhaps try%reset -f
at the top of your notebook? – Edydef by_q(days=1, quarter="q1y2015 "): q = test_2015[test_2015.signup_yr_q==quarter] q_days = q[(q.signup_to_offer < datetime.timedelta(days = days)) | (q.signup_to_list < datetime.timedelta(days = days))] return q_days
The dataframe appears, but not slider bar. Yet, no error messages appear as well. As mentioned above, I am settling for copying codes into a separate notebook for now. Sorry if I fumble a bit here guys! Thanks for your kind patience! – Pastorship%matplotlib inline
from __future__ import division
from ipywidgets import *
import numpy as np
import matplotlib.pyplot as p
. Then I just callinteract (function, arg1=(0,100,1), arg2=(0,100,1), etc.)
. Make sure you have the latest distribution. I use Anaconda and update most packages about once a month, since Jupyter is still being heavily developed. – Bonds