Skip to content

Commit e896a91

Browse files
committed
Edits to rst
GH21220
1 parent fdf324c commit e896a91

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

doc/source/merging.rst

+16-17
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,8 @@ You can also pass a list of dicts or Series:
506506
507507
.. _merging.join:
508508

509-
Database-style DataFrame joining/merging
510-
----------------------------------------
509+
Database-style DataFrame or named Series joining/merging
510+
--------------------------------------------------------
511511

512512
pandas has full-featured, **high performance** in-memory join operations
513513
idiomatically very similar to relational databases like SQL. These methods
@@ -522,7 +522,7 @@ Users who are familiar with SQL but new to pandas might be interested in a
522522
:ref:`comparison with SQL<compare_with_sql.join>`.
523523

524524
pandas provides a single function, :func:`~pandas.merge`, as the entry point for
525-
all standard database join operations between ``DataFrame`` objects:
525+
all standard database join operations between ``DataFrame`` or named ``Series`` objects:
526526

527527
::
528528

@@ -531,31 +531,31 @@ all standard database join operations between ``DataFrame`` objects:
531531
suffixes=('_x', '_y'), copy=True, indicator=False,
532532
validate=None)
533533

534-
* ``left``: A DataFrame object.
535-
* ``right``: Another DataFrame object.
534+
* ``left``: A DataFrame or named Series object.
535+
* ``right``: Another DataFrame or named Series object.
536536
* ``on``: Column or index level names to join on. Must be found in both the left
537-
and right DataFrame objects. If not passed and ``left_index`` and
537+
and right DataFrame and/or Series objects. If not passed and ``left_index`` and
538538
``right_index`` are ``False``, the intersection of the columns in the
539-
DataFrames will be inferred to be the join keys.
540-
* ``left_on``: Columns or index levels from the left DataFrame to use as
539+
DataFrames and/or Series will be inferred to be the join keys.
540+
* ``left_on``: Columns or index levels from the left DataFrame or Series to use as
541541
keys. Can either be column names, index level names, or arrays with length
542-
equal to the length of the DataFrame.
543-
* ``right_on``: Columns or index levels from the right DataFrame to use as
542+
equal to the length of the DataFrame or Series.
543+
* ``right_on``: Columns or index levels from the right DataFrame or Series to use as
544544
keys. Can either be column names, index level names, or arrays with length
545-
equal to the length of the DataFrame.
545+
equal to the length of the DataFrame or Series.
546546
* ``left_index``: If ``True``, use the index (row labels) from the left
547-
DataFrame as its join key(s). In the case of a DataFrame with a MultiIndex
547+
DataFrame or Series as its join key(s). In the case of a DataFrame or Series with a MultiIndex
548548
(hierarchical), the number of levels must match the number of join keys
549-
from the right DataFrame.
550-
* ``right_index``: Same usage as ``left_index`` for the right DataFrame
549+
from the right DataFrame or Series.
550+
* ``right_index``: Same usage as ``left_index`` for the right DataFrame or Series
551551
* ``how``: One of ``'left'``, ``'right'``, ``'outer'``, ``'inner'``. Defaults
552552
to ``inner``. See below for more detailed description of each method.
553553
* ``sort``: Sort the result DataFrame by the join keys in lexicographical
554554
order. Defaults to ``True``, setting to ``False`` will improve performance
555555
substantially in many cases.
556556
* ``suffixes``: A tuple of string suffixes to apply to overlapping
557557
columns. Defaults to ``('_x', '_y')``.
558-
* ``copy``: Always copy data (default ``True``) from the passed DataFrame
558+
* ``copy``: Always copy data (default ``True``) from the passed DataFrame or named Series
559559
objects, even when reindexing is not necessary. Cannot be avoided in many
560560
cases but may improve performance / memory usage. The cases where copying
561561
can be avoided are somewhat pathological but this option is provided
@@ -587,8 +587,7 @@ all standard database join operations between ``DataFrame`` objects:
587587
Support for merging named ``Series`` objects was added in version 0.24.0.
588588

589589
The return type will be the same as ``left``. If ``left`` is a ``DataFrame`` or named ``Series``
590-
and ``right`` is a subclass of ``DataFrame``, the return type will still be
591-
``DataFrame``.
590+
and ``right`` is a subclass of ``DataFrame``, the return type will still be ``DataFrame``.
592591

593592
``merge`` is a function in the pandas namespace, and it is also available as a
594593
``DataFrame`` instance method :meth:`~DataFrame.merge`, with the calling

0 commit comments

Comments
 (0)