[IPython-dev] Editing a table in the notebook

Francesc Alted faltet at gmail.com
Tue Dec 15 04:10:23 EST 2015


Hi,

I am trying to see if there is an easy way to edit a table (pandas
dataframe or whatever that can be seen as tabular data) inside the jupyter
notebook.

Right now, I am trying to make the handsontable (http://handsontable.com/)
widget to work using this recipe by Cyrille Rossant:
https://gist.github.com/rossant/9463955.  However, after spending a couple
of hours, I still cannot do that with a recent version of Jupyter (1.0.0)
and ipywidgets (4.1.0).

I think the problem is the location of where to put the .js and .css
files.  So following the recipe above, I copied a couple of handsontable
files in:

$ ll ~/.ipython/profile_default/static/custom
total 1048
drwxrwxr-x 2 faltet faltet    4096 dic 15 09:22 ./
drwxrwxr-x 3 faltet faltet    4096 dic 15 09:15 ../
-rw-rw-r-- 1 faltet faltet      47 dic 15 09:22 custom.css
-rw-rw-r-- 1 faltet faltet      50 dic 15 09:22 custom.js
-rw-rw-r-- 1 faltet faltet   27378 dic 15 09:17 handsontable.full.css
-rw-rw-r-- 1 faltet faltet 1024388 dic 15 09:17 handsontable.full.js
$ cat ~/.ipython/profile_default/static/custom/custom.css
@import "/static/custom/handsontable.full.css"
$ cat ~/.ipython/profile_default/static/custom/custom.js
require(['/static/custom/handsontable.full.js']);

But I keep getting the next messages in the console:

[W 09:48:26.860 NotebookApp] 404 GET /static/custom/handsontable.full.css
(127.0.0.1) 7.69ms referer=http://localhost:8888/custom/cu
stom.css
[W 09:48:27.267 NotebookApp] Notebook handsondataframe.ipynb is not trusted
[W 09:48:27.292 NotebookApp] 404 GET
/static/custom/handsontable.full.js?v=20151215094826 (127.0.0.1) 2.03ms
referer=http://localhos
t:8888/notebooks/handsondataframe.ipynb

so, 404 is a clear indication that the files have not been found.

My guess is that the place to put .css and .js files has changed in newer
versions of IPython/Jupyter notebook.

Hints?

-- 
Francesc Alted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151215/2d864e20/attachment.html>


More information about the IPython-dev mailing list