Skip to content
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

Raise if None is passed for skipna #44579

Merged
merged 3 commits into from
Nov 24, 2021
Merged

Raise if None is passed for skipna #44579

merged 3 commits into from
Nov 24, 2021

Conversation

phofl
Copy link
Member

@phofl phofl commented Nov 22, 2021

will deprecate mad in follow up

@phofl phofl added the Reduction Operations sum, mean, min, max, etc. label Nov 22, 2021
@jreback jreback added this to the 1.4 milestone Nov 23, 2021
@@ -399,6 +399,7 @@ Other API changes
^^^^^^^^^^^^^^^^^
- :meth:`Index.get_indexer_for` no longer accepts keyword arguments (other than 'target'); in the past these would be silently ignored if the index was not unique (:issue:`42310`)
- Change in the position of the ``min_rows`` argument in :meth:`DataFrame.to_string` due to change in the docstring (:issue:`44304`)
- Reduction operations for :class:`DataFrame` or :class:`Series` nor raising a ``ValueError`` when ``None`` is passed for ``skipna`` (:issue:`44178`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this an actual change though? this is just restoring the 1.3.x behavior right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 1.3.x skipna=None was the default, but it was documented as bool, default True. The None was translated into True internally. This was changed to skipna=True in #43980, but now None was evaluated to False internally. This ensures that we raise for non boolean inputs.

@jreback jreback merged commit d5b958a into pandas-dev:master Nov 24, 2021
@jreback
Copy link
Contributor

jreback commented Nov 24, 2021

thanks @phofl

@phofl phofl deleted the 44178 branch November 24, 2021 09:01
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reduction Operations sum, mean, min, max, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: behaviour of skipna=None changed on master
2 participants