[IPython-dev] Getting the size of ipython notebook cell

Matthias Bussonnier bussonniermatthias at gmail.com
Wed Jul 9 12:41:33 EDT 2014

Le 9 juil. 2014 à 17:56, bjonen a écrit :

>> Truncation is never a good idea, you will always get the truncation wrong
>> in some cases. 
> Not sure why you think it is a bad idea. If you think about large datasets:

> In my opinion it is much more convenient to only see a start and the end of
> the frame (both row and column direction) instead of having to scroll
> through hundreds of columns (see
> https://github.com/pydata/pandas/pull/7086). Of course this would be an
> optional behavior. 

Because everyone has different opinion :-) 
I think it would be nice to have the behavior for things like head() which are explicit. 

But you will piss off user that have users that have data frame that are just slightly too big to fit, 
and will be forced to explicitly tell not to truncate. 

But that my point of view, and I'm probably not an as heavy panda user as you are.

Hopefully widget might help. you might have a .widget() that show a subpart of the 
table and fetches the new parts as you scroll, and then you can do almost whatever with search fields…


>> Javascript it not totally an answer either, you will/might not be able to
>> listen for a resize event.
>> I would investigate pure css stuff like that :
>> https://css-tricks.com/examples/ResponsiveTables/responsive.php
>> and use bootstrap responsive utilities:
>> http://getbootstrap.com/css/#responsive-utilities
>> If you really want responsive table with dynamism and javascript I would 
>> suggest doing it in separate package like mpld3 does for matplotlib, or
>> cyrile rossant handson table.
>> http://nbviewer.ipython.org/gist/rossant/9463955
>> Publishing scripts tag is always brittle and unreliable.
> Thanks for your help! Sounds like what I had in mind is difficult and
> probably not worth the trouble. 
> Benjamin
> --
> View this message in context: http://python.6.x6.nabble.com/Getting-the-size-of-ipython-notebook-cell-tp5063264p5063532.html
> Sent from the IPython - Development mailing list archive at Nabble.com.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

More information about the IPython-dev mailing list