-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: categorical doesn't handle display.width of None in Python 3 (GH10087) #10108
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
max_width = (width if get_option("display.width") == 0 | ||
else get_option("display.width")) | ||
display_width = get_option("display.width") | ||
max_width = (width if (display_width == 0 or display_width is None) |
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.
you can just do width or display_width or 80
(to assure its never 0/None)
I think my git skills have gone rusty. I am trying to amend my commit, but it doesn't like that I have already pushed it - it won't accept my new (amended) push, saying I am behind the remote counterpart. But the remote just has the changes before the amended commit. Any hints? |
I just forced the push. Not sure if there was any better way. At any rate, I incorporated most of your comment. I think 0 is a valid value, as it's checked against in code below. Thanks for your feedback! |
@rosnfeld Yes, you need to force if you amend a commit. |
Ok, good to know - thanks. @jreback Travis is happy if you're happy (with this change). |
BUG: categorical doesn't handle display.width of None in Python 3 (GH10087)
@rosnfeld thanks! hope this exercised those git skills! maybe need another PR to work on that :) |
closes #10087
I think this is fairly straightforward, however I am not sure if the prior code comparing
display.width
to 0 was correct... isdisplay.width
ever supposed to be set to 0? It looks suspiciously similar to a snippet fromSeries.__unicode__()
, but that is looking atdisplay.max_rows
. Maybe it was brought over incorrectly?If it should just be a simple comparison to None, not 0 as it was before, just let me know and I'll amend this.