-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
How to align title and value? #7968
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
Comments
Are all of those characters the same fixed width as the numbers below? It's putting in the 'correct' number of padding spaces, assuming the characters are fixed width: In [39]: df
Out[39]:
丂丅丆七 丈三上丌万下丈
0 0 1
1 0 1
2 0 1
In [40]: en
Out[40]:
aaaa bbbbbbb
0 0 1
1 0 1
2 0 1
In [41]: str(df)
Out[41]: ' 丂丅丆七 丈三上丌万下丈\n0 0 1\n1 0 1\n2 0 1'
In [42]: str(en)
Out[42]: ' aaaa bbbbbbb\n0 0 1\n1 0 1\n2 0 1'
In [43]: str(en).count(' ')
Out[43]: 44
In [44]: str(df).count(' ')
Out[44]: 44 |
The character's twice the number's width,so i can't solve this problem. |
Ok. You may have more luck in the IPython notebook, since those are in HTML. My example looks a lot nicer. I'm going to close this issue since I don't think there's any realistic way to get the character width in python. |
This is a dupe of #2612. |
if i use the chinese as column name,the column names and values could not be aligned,like this:

The text was updated successfully, but these errors were encountered: