-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: columns misaligned in repr when having >10 columns with integer index #8300
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
wow you have good eyes! @jorisvandenbossche |
hmm, wondering if I caused this here somehow: #8282 |
More simple example:
Yes, but if you do it with integer values in the dataframe, then it is more noticeable :-) |
cc @bjonen |
In v0.13.0 (central truncation was introduced in 0.14)
|
@bjonen can you have a look? |
The formatting is done with the
Perhaps replacing
with
will work. |
maybe for index type of floating/integer they should right justify? |
This is also true in 0.14.1. Let's defer for now. |
Similar issue with mixed float/NaN indexes, but spaces get applied on opposite sides: In [2]: pd.Float64Index([0.0, np.nan, 2.0]).format()
Out[2]: [' 0.0', 'NaN ', ' 2.0']
In [3]: pd.Index([0.0, np.nan, 2.0], dtype=object).format()
Out[3]: [' 0.0', 'NaN ', ' 2.0'] Doesn't happen if a non-float is included: In [4]: pd.Index([0.0, np.nan, 2], dtype=object).format()
Out[4]: ['0.0', 'NaN', '2'] |
I took a look at this issue and here are my findings:
I am not sure how to solve it since there are so many functions involved that are also related to other process. I hope this findings will help somebody else solve this issue. |
On master, with integer index, with more than 10 columns, the numbers of one char are misaligned:
The text was updated successfully, but these errors were encountered: