Skip to content

ENH: follow up on indx-repr #10095

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 9, 2015 · 1 comment
Closed

ENH: follow up on indx-repr #10095

jreback opened this issue May 9, 2015 · 1 comment
Labels
Closing Candidate May be closeable, needs more eyeballs Enhancement Index Related to the Index class or subclasses Output-Formatting __repr__ of pandas objects, to_string

Comments

@jreback
Copy link
Contributor

jreback commented May 9, 2015

follow up to #9901

  • also splitting the attributes part over multiple lines if this is very long
  • for truncated output: now hard-code at 10 elements, but this could maybe also be 1 line? (and possibly with a minimum number of elements for longer strings) Because now, small integers don't fill the full line with 10 elements, and eg floats there is one element on the second line:

This is a function of the display.width. But the truncated output should restrict to a single-line if this happens.

In [6]: pd.set_option('display.width',100)

In [7]: Index(np.arange(400.))
Out[7]: 
Float64Index([  0.0,   1.0,   2.0,   3.0,   4.0,   5.0,   6.0,   7.0,   8.0,   9.0, 
              ...
              390.0, 391.0, 392.0, 393.0, 394.0, 395.0, 396.0, 397.0, 398.0, 399.0],
             dtype='float64', length=400)

In [8]: pd.set_option('display.width',80)

In [9]: Index(np.arange(400.))
Out[9]: 
Float64Index([  0.0,   1.0,   2.0,   3.0,   4.0,   5.0,   6.0,   7.0,   8.0,
                9.0, 
              ...
              390.0, 391.0, 392.0, 393.0, 394.0, 395.0, 396.0, 397.0, 398.0,
              399.0],
             dtype='float64', length=400)

This could eg easily be restricted to two times one line.

@jreback jreback added Enhancement Indexing Related to indexing on series/frames, not to indexes themselves Output-Formatting __repr__ of pandas objects, to_string labels May 9, 2015
@jreback jreback added this to the 0.17.0 milestone May 9, 2015
@jreback jreback modified the milestones: Next Major Release, 0.17.0 Aug 15, 2015
@toobaz toobaz added Index Related to the Index class or subclasses and removed Indexing Related to indexing on series/frames, not to indexes themselves labels Jun 28, 2019
@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
@jbrockmendel jbrockmendel added the Closing Candidate May be closeable, needs more eyeballs label Feb 11, 2023
@mroeschke
Copy link
Member

We don't have these index subclasses anymore so probably not too relevant. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closing Candidate May be closeable, needs more eyeballs Enhancement Index Related to the Index class or subclasses Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

No branches or pull requests

4 participants