Skip to content

API: use show_dimensions default to decide whether to show Series length #7117

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
jreback opened this issue May 13, 2014 · 8 comments · Fixed by #15974
Closed

API: use show_dimensions default to decide whether to show Series length #7117

jreback opened this issue May 13, 2014 · 8 comments · Fixed by #15974
Labels
API Design Output-Formatting __repr__ of pandas objects, to_string
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented May 13, 2014

rather than display.max_rows directly

for considency with the new 'truncate' option

@jreback jreback added this to the 0.14.1 milestone May 13, 2014
@jreback jreback changed the title API: use show_dimensions default to show Series length API: use show_dimensions default to decide whether to show Series length May 13, 2014
@jreback
Copy link
Contributor Author

jreback commented Jun 10, 2014

cc @bjonen if you have time

@bjonen
Copy link
Contributor

bjonen commented Jun 19, 2014

So you are referring to changing this line?
https://github.com/pydata/pandas/blob/master/pandas/core/series.py#L831
Right now, the dimensions are only printed if we produce a tidy_repr.

And you would like the docs to be implemented?

Whether to print out dimensions at the end of DataFrame repr.
If 'truncate' is specified, only print out the dimensions if the
frame is truncated (e.g. not display all rows and/or columns)

@jreback
Copy link
Contributor Author

jreback commented Jun 19, 2014

would be reworking this to decide if it's truncated
then based on show_dimensions setting shoe the length ( or not)

@jreback jreback modified the milestones: 0.15.0, 0.14.1 Jun 19, 2014
@bjonen
Copy link
Contributor

bjonen commented Jun 19, 2014

show_dimennsions can be

  • truncate: In this case we print the dimensions only if the series gets truncated.
  • True In this case we print the dimensions (this is not implemented right now) independent of whether the series got truncated.
  • False In this case we do not print the dimensions inpependent of whether the series got truncated.

If that's ok I can make the adjustment.

@jreback
Copy link
Contributor Author

jreback commented Jun 19, 2014

that looks right (tests are current in test_format.py for the DataFrame impl of this, so maybe add Series to that or below). Further can you update the show_dimensions option in core/config_init.py to reflect this better?

thanks

@jreback jreback modified the milestones: 0.14.1, 0.15.0 Jun 19, 2014
@jorisvandenbossche
Copy link
Member

Am I right that nothing will change with the default settings? (as in 0.14 the length of the series is only shown when truncated, and the show_dimensions option is 'truncate' by default)
So only if a user would set show_dimensions to True or False the display behaviour will change (and always or never show the series length)?

Just asking because I was doubting if this would warrant a change in the default display behaviour (but AFAIU, this is not the case so no problem).

@jorisvandenbossche
Copy link
Member

BTW, while testing I saw another issue: #7508

@jreback
Copy link
Contributor Author

jreback commented Jun 19, 2014

@jorisvandenbossche the user facing API shouldn't change (as the default is basically 'truncate' with Series now). but will be consistent if the user DOES change it.

@jreback jreback modified the milestones: 0.15.0, 0.14.1 Jun 26, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@jreback jreback modified the milestones: 0.20.0, Next Major Release Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants