Skip to content

_repr_html_ creates extra scrollbar in ipython notebook #9268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xLaszlo opened this issue Jan 16, 2015 · 7 comments
Closed

_repr_html_ creates extra scrollbar in ipython notebook #9268

xLaszlo opened this issue Jan 16, 2015 · 7 comments
Labels
IO HTML read_html, to_html, Styler.apply, Styler.applymap Output-Formatting __repr__ of pandas objects, to_string
Milestone

Comments

@xLaszlo
Copy link

xLaszlo commented Jan 16, 2015

This line: div style="max-height:1000px;max-width:1500px;overflow:auto;" is added to the output if the df is too large. This behaviour is handled in ipython anyway so should be removed or optional.

@jreback
Copy link
Contributor

jreback commented Jan 16, 2015

pls show a picture of what you mean.

@jreback jreback added IO HTML read_html, to_html, Styler.apply, Styler.applymap Output-Formatting __repr__ of pandas objects, to_string labels Jan 16, 2015
@TomAugspurger
Copy link
Contributor

I think the OP is talking about if you click on the area that scrolls the output.

image

Doesn't make sense to remove our truncation/scrolling though. IPython's default is to display the whole output by default. It could be made as an option I suppose.

@xLaszlo
Copy link
Author

xLaszlo commented Jan 17, 2015

That's exactly what I meant, thanks for posting.
An option would be fine as well.

@kpweiler
Copy link

I was about to add a feature request to expose this max-height and max-width (of the frame) so that I could make it larger. If you want to look at a dataframe in iPython with many columns on a large screen, this option would be very useful.

@TomAugspurger
Copy link
Contributor

@kpweiler we do have those options already, if I'm understanding correctly.

Have a a look at http://pandas.pydata.org/pandas-docs/dev/generated/pandas.set_option.html

specifically display.max_columns and display.max_rows.

@xLaszlo do you want to check on how this behaves with IPython 3.0 and 3.1? I think they made some changes w/ how scrolling is handled there. A PR making our styling optional would be great.

@kpweiler
Copy link

@TomAugspurger if you look at the function, repr_html in core/Frame.py, you will notice that it returns hardcoded values for max-height and max-width. The display.max_columns and display.max_rows certainly allow all the columns and rows to be displayed, it just arbitrarily cuts them off with a scrollbar at 1000px and 1500px respectively. For the time being, I've just hacked at the pandas code to return max-width:none, but obviously, if I upgrade that will go away.

I have changed my ipython notebook custom.css to have an infinitely resizable (in width) notebook, which I would like the pandas dataframe to follow.

@jorisvandenbossche
Copy link
Member

I think this was closed by #10232

@jorisvandenbossche jorisvandenbossche added this to the 0.16.2 milestone Jul 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO HTML read_html, to_html, Styler.apply, Styler.applymap Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

No branches or pull requests

5 participants