Skip to content
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

Printing MultiIndex DataFrame header should be more compact #138

Open
sam-s opened this issue Feb 14, 2019 · 0 comments
Open

Printing MultiIndex DataFrame header should be more compact #138

sam-s opened this issue Feb 14, 2019 · 0 comments

Comments

@sam-s
Copy link

sam-s commented Feb 14, 2019

MultiIndex DataFrame header is poorly aligned:

>>> pd.DataFrame({("extra very long top level name","Z"):[1,2,3],
                  ("extra very long top level name","longish second level name"):[4,5,6]})
  extra very long top level name                          
                               Z longish second level name
0                              1                         4
1                              2                         5
2                              3                         6

It would be more compact and readable if the first column of the second level did not try to align with the first level:

  extra very long top level name                          
     Z longish second level name
0    1                         4
1    2                         5
2    3                         6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant