Skip to content

Backport PR #31015 on branch 1.0.x (DOC: Fixed documented value of pd.NA ** 0 (#31005)) #31019

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions doc/source/user_guide/missing_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -825,13 +825,10 @@ For example, ``pd.NA`` propagates in arithmetic operations, similarly to
There are a few special cases when the result is known, even when one of the
operands is ``NA``.

.. ipython:: python

================ ======
Operation Result
================ ======
``pd.NA ** 0`` 0
``1 ** pd.NA`` 1
================ ======
pd.NA ** 0
1 ** pd.NA

In equality and comparison operations, ``pd.NA`` also propagates. This deviates
from the behaviour of ``np.nan``, where comparisons with ``np.nan`` always
Expand Down