Skip to content

DOC: Add notes to nullable types documentation about pd.NA column type #57050

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions doc/source/user_guide/boolean.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ If you would prefer to keep the ``NA`` values you can manually fill them with ``

s[mask.fillna(True)]

Note that when creating a new column with only :attr:`pandas.NA` values,
its dtype will be ``"object"``, since the value is also used for
:ref:`nullable integers <integer_na>`.

.. ipython:: python

df = pd.DataFrame()
df['objects'] = pd.NA
df.dtypes

.. _boolean.kleene:

Kleene logical operations
Expand Down
10 changes: 10 additions & 0 deletions doc/source/user_guide/integer_na.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ with the dtype.
In the future, we may provide an option for :class:`Series` to infer a
nullable-integer dtype.

Note that when creating a new column with only :attr:`pandas.NA` values,
its dtype will be ``"object"``, since the value is also used for
:ref:`booleans <booleans>`.

.. ipython:: python

df = pd.DataFrame()
df['objects'] = pd.NA
df.dtypes

Operations
----------

Expand Down