ENH: Change truncation ellispsis to unicode character
State: closed

Changes the truncation symbol from '...' to the math characters horizontal, vertical and diagnol ellipsis as proposed in https://github.com/pydata/pandas/pull/7086#issuecomment-42862717. 

In the Ipython Notebook, the result looks like this

http://nbviewer.ipython.org/gist/bjonen/492fea9559fd73edf579

To do: 
- Do we need to fall back to simple strings in certain environments (https://github.com/pydata/pandas/pull/7086#issuecomment-42999103)? 


Labels:
name: Enhancement
name: Output-Formatting
description: __repr__ of pandas objects, to_string

Comments:
I believe https://github.com/pydata/pandas/issues/7174 is fixed. Shall I try to apply the changes to the current master or should we try to merge this enhanced version? 

http://nbviewer.ipython.org/gist/bjonen/27aaf7d0981c8c1b4d84

hmm

I suppose if we merge the enhanced version then we should cut a rc2 (no big deal to do it). 

@cpcloud @jorisvandenbossche ?

i think we should merge the fix for #7174 then cut the rc

and leave this for 14.1

@bjonen can you split out that fix into a separate PR?

Sure will do. 

@bjonen can you show `df.T` in the notebook example? thx

You are right. Row multiindex needs fixing also. 

The column fix was easy to extract. I'll submit a PR when the rows are done.  

awesome column fix looks good!

Rebased with current master and updated notebook (see top). 

add an example in v0.14.1.txt (this is now going to be only place, no more release notes)

@bjonen whenever you can address my comments....like to get this in early this cycle

@jreback Sure, changed the location of the ellipsis. Example is still missing. I'm dealing with a problem in the console at the moment. 

While the unicode characters seem to work well in the notebook, I'm having a bit of trouble in the console representation. It seems the unicode characters are not aligning properly. I'll look into this as soon as I have the time. 

I'm having trouble to align the unicode characters well in the console. I'm not sure it might be that they do not take exactly one character length. 

I can post an example case on the weekend. If this should go in the next release we could just keep it for html for now. 

Here is a small before and after for a dataframe with the unicode character in the terminal. 
0,14
![before](https://cloud.githubusercontent.com/assets/832380/3335210/b1e4023a-f80e-11e3-94ce-235252d68c32.png)
After
![after](https://cloud.githubusercontent.com/assets/832380/3335211/b5e11aee-f80e-11e3-8287-8d1d6639a14c.png)
The vertical ellipsis is shifted to the right of the above character which looks weird. Unless somebody has an idea how to fix this, perhaps we just have the unicode characters for the notebook and stick to the old representation for the terminal. 

What do you think? 

my 2c. I think that using horizontal dots for both vertical/horizonatl sep is fine. the only enhancement that I think I saw was the using the diagonal dots are cool, but these are unicode so have to be restricted to terminals? (or just html?)

i think using horizontal dots crowds the display unnecessarily.

@bjonen the vert ellipsis _is_ slightly aligned to the right with certain fonts on certain terminals which personally i think is not a problem, and i would say is certainly better than `...` right or even center aligned.

```
In [8]: print('1\n⋮\n2')
1
⋮
2
```

on github it shows up where you'd think.

i suggested the `⋮`, `⋯`, and `⋱` because that's what the Julia folks use to display arrays and i think it looks _really_ nice. they've been fairly successful in using this and i think it's a nice way to slightly modernize the look and feel of `DataFrame`s. 

What about having an (experimental?) option (default `off`) that allows one to use unicode ellipsis characters

something like

```
pd.options.display.unicode_ellipsis = True
```

I agree that unicode ellipsis are prettier. However, I find the slight right-alignment in the Ubuntu terminal quite confusing. Making this optional for now sounds good to me. 

closing for now. I think the display is good ATM.