-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: provide a null_counts keyword to df.info() to force showing of null counts #8701
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
|
||
with option_context('display.max_info_rows',5,'display.max_info_columns',5): | ||
check(None, False) | ||
check(True, False) |
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.
@jorisvandenbossche I think this is a bug actually, e.g. if you have a really small info display it doesn't display any column counts, but prob a minor point.
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.
I don't follow I think. Shouldn't this new kwarg null_counts
not overrule if the frame is larger than max_info_rows/columns
?
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.
it should and does, but the display is simply not printed out (too many columns), so this is sort of not-applicable.
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.
ah, yes, I see, in such a case, the null_count
option has just no effect. I don't really think it is a bug. You could warn that it is ignored in such case if it is specified, but doesn't seem that necesarilly.
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.
yep, ok on the name null_counts
? This is really just for an interactive session where you don't want to keep resetting max_info_rows
.
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.
yep, ok on the name!
8c79317
to
a95549e
Compare
ENH: provide a null_counts keyword to df.info() to force showing of null counts
Allows run-time control of showing of null-counts with
df.info()
(similar to what we allow with for example memory_usage in that this will override the default options for that call)Default for a small frame (currently) is to show the non-null counts
When you have a big frame, right now you need to set max_info_rows to control this option