Rework display logic again. · Pull Request #3663 · pandas-dev/pandas (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation8 Commits7 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

ghost

v0.11.0 introduced last-minute changes to the way the dataframe display logic works,
and they haven't proven themselves. The churn is unforunate, but if it's broken,
fix it.

height is deprecated.
max_rows solely determines the amount of rows displayed.

rebased on top of #3657.

Merging the previous PR and subsequent last minute fixes so close to the release
contributed to the problems only being discovered after the release.
So please test and report if this works for you, in terminal, qtconsole or notebook,
since the 0.11.1 release is so close.

cc @hayd , @lodagro ,@jreback

y-p added 4 commits

May 21, 2013 02:47

@ghost ghost mentioned this pull request

May 21, 2013

@jreback

I did this in an xterm

df = DataFrame(randn(100,20))
pd.set_option('display.max_rows',200)

worked

but then

pd.set_option('display.max_columns',10)
pd.set_option('display.max_info_columns',10)

still displayed the full columns, should this have display the info display?
(all other options were default, and screen width was 300)

as an aside, maybe I just don't understand but why do we have both max_columns and
max_info_columns?

is there a time when you would have them different?

@jreback

@y-p the deprecated message for display.height should be max_rows?

@ghost

@jreback , try now?

max_info_columns is a limit for the summary view to prevent excessive
delay. max_columns (+ expand_frame_repr) controls whether summary view is invoked.
you might have max_columns =20, but max_info_columns = 1e6
in theory.

Update:
width is only used to determine the wrapping when expand_frame_repr style is used.

@jreback

seemed to work, I had display.expand_frame_repr set to the default (True), which essentially overrides? max_columns/max_info_columns in a terminal? (IOW, I couldn't force summary view until I set expand_frame_repr to False (along with max_columns=10,max_info_columns=10)

2 feature requests:

  1. pd.set_option('display.max_columns=10,display.max_info_columns=10)` to set multiple options? or too cumbersome
  2. I think a doc outlining several common use-cases (and how to achieve) them may be in order

@ghost

re expand_frame_repr:

In [13]: pd.describe_option('expand_frame')
display.expand_frame_repr: [default: True] [currently: False]
: boolean
        Whether to print out the full DataFrame repr for wide DataFrames
        across multiple lines.
        If False, the summary representation is shown.

doesn't that match the description?

re pd.set_option, option_context accepts option_context(pat,val,pat,val,...) we can add support for that,
open an issue for 0.12?

Would welcome your help on examples for the doc.

y-p added 2 commits

May 21, 2013 16:12

@wesm

@y-p sorry for slowness on my end, i'll take a look soon at this

@wesm

Verified that this fixed the "brokenness" I was experiencing in the IPython notebook (i.e. not being able to get the HTML view unless line_width was increased). Going to merge now and close the loop

wesm added a commit that referenced this pull request

May 25, 2013

@wesm

@wesm

Thanks again, team, as always

@wesm wesm mentioned this pull request

May 25, 2013

@ghost ghost deleted the GH3541 branch

May 28, 2013 19:44

2 participants

@jreback @wesm