[IPython-dev] Integrating a JS grid control with ipython notebook?

Thomas Kluyver takowl at gmail.com
Thu Dec 19 19:22:03 EST 2013


On 19 December 2013 15:39, Patrick Surry <patrick.surry at gmail.com> wrote:

> One of the things that would make pandas even more awesome(!) for me in
> the ipython notebook would be if I could display wide/long tables in a more
> flexible way than static html with horizontal and vertical scrollbars.
>  (Then maybe a pivot table/chart widget :-)
>
> It seems like there are tons of JS grid controls out there - has anyone
> experimenting with rendering a pandas dataframe into a bit of interactive
> JS?   I've had a little experience with the google charts table
> visualization tho it isn't super flexible.
>
> I'd be willing to hack on it if someone could give me some "getting
> started" pointers.
>

I don't know of anyone who's looked into that, but I agree it would be neat.

There are two possible approaches, I think:

First, you could spice up the HTML repr (e.g. to allow sorting/filtering
columns, hiding parts of the table, etc.), but still keep all the data in
the display. This would be relatively easy - you just need to copy a
DataFrame's to_html() method and add a reference to some JS.

Second, you could use the new widget stuff (
https://github.com/ipython/ipython/pull/4374 ) to communicate between the
table view and the DataFrame. This would be considerably trickier, but it
would allow you to work with very large data frames, because you don't have
to send all the data to the frontend at once. It could also enable two-way
communications, so you could edit the DataFrame from the table view.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131219/ba7ea9ce/attachment.html>


More information about the IPython-dev mailing list