Skip to content
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

Rework display logic again. #3663

Merged
merged 7 commits into from May 25, 2013
Merged

Rework display logic again. #3663

merged 7 commits into from May 25, 2013

Conversation

ghost
Copy link

@ghost ghost commented May 21, 2013

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

@ghost ghost mentioned this pull request May 21, 2013
@jreback
Copy link
Contributor

jreback commented May 21, 2013

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
Copy link
Contributor

jreback commented May 21, 2013

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

@ghost
Copy link
Author

ghost commented May 21, 2013

@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
Copy link
Contributor

jreback commented May 21, 2013

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
Copy link
Author

ghost commented May 21, 2013

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.

@wesm
Copy link
Member

wesm commented May 24, 2013

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

@wesm
Copy link
Member

wesm commented May 25, 2013

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 merged commit 0c0180f into pandas-dev:master May 25, 2013
@wesm
Copy link
Member

wesm commented May 25, 2013

Thanks again, team, as always

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants