-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: DataFrame.all(bool_only=True) inconsistency with object dtype #37799
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
assert self.ndim == 2 | ||
|
||
new_blocks = [] | ||
for i, ref_loc in enumerate(self.mgr_locs): |
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.
could be done as a list comprehension
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.
but nbd
|
||
Consistency of DataFrame Reductions | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
:meth:`DataFrame.any` and :meth:`DataFrame.all` with ``bool_only=True`` now |
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.
can you add this PR number here, and is there an actual issue? ping on green.
doc/source/whatsnew/v1.2.0.rst
Outdated
|
||
*New behavior*: | ||
|
||
.. code-block:: ipython |
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.
can you make this an ipython-block
""" | ||
assert self.ndim == 2 | ||
|
||
new_blocks = [] |
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.
might be worth adding some unit tests for this (e.g. on a block that is empty, since column and multilple)
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.
good idea, was accidentally making a copy instead of a view!
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.
wow, testing is good!
ping |
|
||
.. ipython:: python | ||
|
||
In [5]: df.all(bool_only=True) |
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.
don't need the prompts (remove in followon / other PR)
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.
so remove the "In [5]: "? do i also remove the "Out [5]: "?
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 i python will generate appropriately
""" | ||
assert self.ndim == 2 | ||
|
||
new_blocks = [] |
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.
wow, testing is good!
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Discussed on the dev call yesterday.