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

DOC: Add missing punctuation to pandas documentation #60982

Merged
merged 2 commits into from
Feb 24, 2025
Merged
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
6 changes: 3 additions & 3 deletions doc/source/reference/arrays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ is an :class:`ArrowDtype`.
support as NumPy including first-class nullability support for all data types, immutability and more.

The table below shows the equivalent pyarrow-backed (``pa``), pandas extension, and numpy (``np``) types that are recognized by pandas.
Pyarrow-backed types below need to be passed into :class:`ArrowDtype` to be recognized by pandas e.g. ``pd.ArrowDtype(pa.bool_())``
Pyarrow-backed types below need to be passed into :class:`ArrowDtype` to be recognized by pandas e.g. ``pd.ArrowDtype(pa.bool_())``.

=============================================== ========================== ===================
PyArrow type pandas extension type NumPy type
Expand Down Expand Up @@ -114,7 +114,7 @@ values.

ArrowDtype

For more information, please see the :ref:`PyArrow user guide <pyarrow>`
For more information, please see the :ref:`PyArrow user guide <pyarrow>`.

.. _api.arrays.datetime:

Expand Down Expand Up @@ -495,7 +495,7 @@ a :class:`CategoricalDtype`.
CategoricalDtype.categories
CategoricalDtype.ordered

Categorical data can be stored in a :class:`pandas.Categorical`
Categorical data can be stored in a :class:`pandas.Categorical`:

.. autosummary::
:toctree: api/
Expand Down
12 changes: 6 additions & 6 deletions doc/source/user_guide/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Text data types

There are two ways to store text data in pandas:

1. ``object`` -dtype NumPy array.
1. ``object`` dtype NumPy array.
2. :class:`StringDtype` extension type.

We recommend using :class:`StringDtype` to store text data.
Expand All @@ -40,20 +40,20 @@ to significantly increase the performance and lower the memory overhead of
and parts of the API may change without warning.

For backwards-compatibility, ``object`` dtype remains the default type we
infer a list of strings to
infer a list of strings to:

.. ipython:: python
pd.Series(["a", "b", "c"])
To explicitly request ``string`` dtype, specify the ``dtype``
To explicitly request ``string`` dtype, specify the ``dtype``:

.. ipython:: python
pd.Series(["a", "b", "c"], dtype="string")
pd.Series(["a", "b", "c"], dtype=pd.StringDtype())
Or ``astype`` after the ``Series`` or ``DataFrame`` is created
Or ``astype`` after the ``Series`` or ``DataFrame`` is created:

.. ipython:: python
Expand Down Expand Up @@ -88,7 +88,7 @@ Behavior differences
^^^^^^^^^^^^^^^^^^^^

These are places where the behavior of ``StringDtype`` objects differ from
``object`` dtype
``object`` dtype:

l. For ``StringDtype``, :ref:`string accessor methods<api.series.str>`
that return **numeric** output will always return a nullable integer dtype,
Expand All @@ -102,7 +102,7 @@ l. For ``StringDtype``, :ref:`string accessor methods<api.series.str>`
s.str.count("a")
s.dropna().str.count("a")
Both outputs are ``Int64`` dtype. Compare that with object-dtype
Both outputs are ``Int64`` dtype. Compare that with object-dtype:

.. ipython:: python
Expand Down
Loading