-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API: allow option truncate for display.show_dimensions to only show dimensions if truncated (GH6457) #7108
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
Conversation
truncate'
or
dplay.show_dimensions
to only show dimensions if truncated (GH6457)truncate
or display.show_dimensions to only show dimensions if truncated (GH6457)
truncate
or display.show_dimensions to only show dimensions if truncated (GH6457)# show dimensions only if truncated | ||
with pd.option_context('display.max_rows', 2, 'display.max_columns', 2, 'display.width', | ||
500, 'display.expand_frame_repr', 'info', 'display.show_dimensions', 'truncate'): | ||
print dfd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use print()
! Same below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right! thanks...
Looks good on a quick glance. |
|
||
# show dimensions only if truncated | ||
with pd.option_context('display.max_rows', 2, 'display.max_columns', 2, 'display.width', | ||
500, 'display.expand_frame_repr', 'info', 'display.show_dimensions', 'truncate'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the display.width
and display.expand_frame_repr
necessary here in the example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really except that I override these in my environement; so just want to ensure all options are setup to allow expanding (or not)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, but for the docs this won't be a problem I think. And now it is a bit overhead for the user to see what the relevant options are. So I would leave them out personally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok...makes sense
@jorisvandenbossche do you think this 'solves' the thread that @jseabold brought up?
small detail to nitpick, but |
@jorisvandenbossche I agree it sounds better, except, that and wanted to be consistent, but ok if you feel strongly |
changed to use 'truncated' & example in v0.14.0.txt simpler |
Ah, but if @jreback about if this closes the issue that @jseabold brought up in #6547, he can maybe better say it himself, but I don't think it really does solve his issue he encountered in statsmodels (the use of dataframes to give back the overview result of a model, for which these dimensions are a bit superfluous/distracting). But as also said on the mailing list, not everybody's needs can be satisfied at the same time. |
ok..put back to 'truncate'. like @jseabold to comment (and maybe should send to ML). but I think let's make the default 'truncate'.? |
Posted on the ML. I tentatively vote for the default to be |
thanks @TomAugspurger |
…sions if the frame is truncated (GH6547)
API: allow option truncate for display.show_dimensions to only show dimensions if truncated (GH6457)
closes #6547
add the option 'trunctate'.
Should this be the new default?????