-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: fix inconsistent col spacing in info #36766
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this dependent on the len(digits in number of columns)?
It is dependent, but the problem was that the width of the string with the column number is the actual width of the number + 1 space (Line 342 of the original file shows that line number string is prepended with a space). This PR fixes the problem and makes consistent spacing even when the number of columns is over 1000. |
# add one space in max_id because there is a one-space padding | ||
# in front of the number | ||
# this allows maintain two spaces gap between columns | ||
max_id = len(pprint_thing(col_count)) + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this was starting playing role only when number of columns was over 1000. Because below 1000 max_id < len_id
. Therefore below 1000 columns there were no issues.
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff