Skip to content

DOC: Add missing punctuation to merging.rst #61315

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
merged 1 commit into from
Apr 21, 2025
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
19 changes: 10 additions & 9 deletions doc/source/user_guide/merging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Joining logic of the resulting axis
The ``join`` keyword specifies how to handle axis values that don't exist in the first
:class:`DataFrame`.

``join='outer'`` takes the union of all axis values
``join='outer'`` takes the union of all axis values.

.. ipython:: python

Expand All @@ -130,7 +130,7 @@ The ``join`` keyword specifies how to handle axis values that don't exist in the
p.plot([df1, df4], result, labels=["df1", "df4"], vertical=False);
plt.close("all");

``join='inner'`` takes the intersection of the axis values
``join='inner'`` takes the intersection of the axis values.

.. ipython:: python

Expand Down Expand Up @@ -296,7 +296,7 @@ the index of the :class:`DataFrame` pieces:

result.index.levels

``levels`` argument allows specifying resulting levels associated with the ``keys``
``levels`` argument allows specifying resulting levels associated with the ``keys``.

.. ipython:: python

Expand All @@ -322,7 +322,7 @@ Appending rows to a :class:`DataFrame`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you have a :class:`Series` that you want to append as a single row to a :class:`DataFrame`, you can convert the row into a
:class:`DataFrame` and use :func:`concat`
:class:`DataFrame` and use :func:`concat`.

.. ipython:: python

Expand Down Expand Up @@ -355,7 +355,7 @@ Merge types
their indexes which must contain unique values.
* **many-to-one**: joining a unique index to one or
more columns in a different :class:`DataFrame`.
* **many-to-many** : joining columns on columns.
* **many-to-many**: joining columns on columns.

.. note::

Expand Down Expand Up @@ -485,8 +485,9 @@ either the left or right tables, the values in the joined table will be
plt.close("all");

You can merge :class:`Series` and a :class:`DataFrame` with a :class:`MultiIndex` if the names of
the :class:`MultiIndex` correspond to the columns from the :class:`DataFrame`. Transform
the :class:`Series` to a :class:`DataFrame` using :meth:`Series.reset_index` before merging
the :class:`MultiIndex` correspond to the columns from the :class:`DataFrame`. You can also
transform the :class:`Series` to a :class:`DataFrame` using :meth:`Series.reset_index`
before merging:

.. ipython:: python

Expand All @@ -504,7 +505,7 @@ the :class:`Series` to a :class:`DataFrame` using :meth:`Series.reset_index` bef
pd.merge(df, ser.reset_index(), on=["Let", "Num"])


Performing an outer join with duplicate join keys in :class:`DataFrame`
Performing an outer join with duplicate join keys in :class:`DataFrame`:

.. ipython:: python

Expand Down Expand Up @@ -1082,7 +1083,7 @@ Stack the differences on rows.

df.compare(df2, align_axis=0)

Keep all original rows and columns with ``keep_shape=True``
Keep all original rows and columns with ``keep_shape=True``.

.. ipython:: python

Expand Down