Skip to content

BUG: multi-index output formatting is buggy (GH7174) #7232

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

Merged
merged 1 commit into from
May 25, 2014

Conversation

bjonen
Copy link
Contributor

@bjonen bjonen commented May 24, 2014

Closes #7174

Adjusts the truncation in the notebook for multiindex dfs. Both rows and columns are affected.

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

@jreback
Copy link
Contributor

jreback commented May 24, 2014

can u show the results for the test cases
(df and df.T) with mi on an axis

@bjonen
Copy link
Contributor Author

bjonen commented May 24, 2014

What do you mean by mi on an "axis"? I added mi on both index and columns in the notebook.

@jreback
Copy link
Contributor

jreback commented May 24, 2014

that's what I meant (has at least a multi index) on 1 axis

@jreback
Copy link
Contributor

jreback commented May 24, 2014

@bjonen
Copy link
Contributor Author

bjonen commented May 25, 2014

Seems like multiindex levels > 2 wasnt as bad as I thought (see updated notebook). I'll add some more tests to the notebook to make sure this is working.

@cpcloud
Copy link
Member

cpcloud commented May 25, 2014

looking good

@cpcloud
Copy link
Member

cpcloud commented May 25, 2014

bit o' merge conflicts there @bjonen let us know if u need help

@jreback jreback changed the title Fix #7174 BUG: multi-index output formatting is buggy (GH7174) May 25, 2014
@jreback jreback added this to the 0.14.0 milestone May 25, 2014
@cpcloud
Copy link
Member

cpcloud commented May 25, 2014

looks like on the last 3 level MI there's a row missing in the last column

@bjonen
Copy link
Contributor Author

bjonen commented May 25, 2014

Thx @cpcloud , fixed it.

@cpcloud
Copy link
Member

cpcloud commented May 25, 2014

nice. looking pretty good. just squash down and should be good to go. maybe put up a final notebook with all the fixes that we can use as a reference for the issue.

@bjonen
Copy link
Contributor Author

bjonen commented May 25, 2014

Ok will merge and squash.

You mean add the notebook from above to the repo? If so, where?

@cpcloud
Copy link
Member

cpcloud commented May 25, 2014

no i just meant update the notebook, which it looks like you did, so nevermind. 👍

@bjonen
Copy link
Contributor Author

bjonen commented May 25, 2014

ok great

@bjonen
Copy link
Contributor Author

bjonen commented May 25, 2014

Added some more cases to the notebook and squashed. If you spot something strange, let me know, otherwise this is ok from my side.

@jreback
Copy link
Contributor

jreback commented May 25, 2014

Worth it to add a MultiIndex example In whatsnew? and/or docs/FAQ (where the display options are)

@bjonen
Copy link
Contributor Author

bjonen commented May 25, 2014

For me it's fine like this. I think most users will just assume central truncation works for the different types of indices and backends (terminal, notebook).

But if you think it's better to showcase the way truncation works more, I'm happy to add an example.

jreback added a commit that referenced this pull request May 25, 2014
BUG: multi-index output formatting is buggy (GH7174)
@jreback jreback merged commit e165ddd into pandas-dev:master May 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug MultiIndex Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MultiIndex notebook repr is incorrect when number of columns is > max_columns
3 participants