Skip to content

Commit 48823a7

Browse files
author
Albert Villanova del Moral
committed
Address requested changes
1 parent 62a67ab commit 48823a7

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

doc/source/whatsnew/v0.20.0.txt

+1-6
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Other enhancements
308308
- ``pd.types.concat.union_categoricals`` gained the ``ignore_ordered`` argument to allow ignoring the ordered attribute of unioned categoricals (:issue:`13410`). See the :ref:`categorical union docs <categorical.union>` for more information.
309309
- ``pandas.io.json.json_normalize()`` with an empty ``list`` will return an empty ``DataFrame`` (:issue:`15534`)
310310
- ``pd.DataFrame.to_latex`` and ``pd.DataFrame.to_string`` now allow optional header aliases. (:issue:`15536`)
311-
- ``Index.intersection()`` accepts parameter ``sort`` (:issue:`15582`)
311+
- ``Index.join()`` accepts parameter ``sort`` (:issue:`15582`)
312312

313313

314314
.. _ISO 8601 duration: https://en.wikipedia.org/wiki/ISO_8601#Durations
@@ -742,7 +742,6 @@ joins (methods ``Index.join``, ``DataFrame.join``, ``DataFrame.merge`` and
742742
.. ipython:: python
743743

744744
idx1.intersection(idx2)
745-
746745
idx1.join(idx2, how='inner')
747746

748747
- ``Series.align``
@@ -830,11 +829,7 @@ joins (methods ``Index.join``, ``DataFrame.join``, ``DataFrame.merge`` and
830829
.. ipython:: python
831830

832831
df1.join(df2, how='inner')
833-
834832
df1.merge(df2, how='inner', left_index=True, right_index=True)
835-
836-
pd.merge(df1, df2, how='inner', left_index=True, right_index=True)
837-
838833
(res1, res2) = df1.align(df2, axis=0, join='inner')
839834
res1
840835
res2

pandas/core/frame.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
* right: use only keys from right frame (SQL: right outer join)
129129
* outer: use union of keys from both frames (SQL: full outer join)
130130
* inner: use intersection of keys from both frames (SQL: inner join),
131-
preserving the order of the left keys
131+
preserving the order of the left keys
132132
on : label or list
133133
Field names to join on. Must be found in both DataFrames. If on is
134134
None and not merging on indexes, then it merges on the intersection of
@@ -4515,11 +4515,11 @@ def join(self, other, on=None, how='left', lsuffix='', rsuffix='',
45154515
* left: use calling frame's index (or column if on is specified)
45164516
* right: use other frame's index
45174517
* outer: form union of calling frame's index (or column if on is
4518-
specified) with other frame's index, and sort it
4519-
lexicographically
4518+
specified) with other frame's index, and sort it
4519+
lexicographically
45204520
* inner: form intersection of calling frame's index (or column if
4521-
on is specified) with other frame's index, preserving the
4522-
order of the calling's one
4521+
on is specified) with other frame's index, preserving the order
4522+
of the calling's one
45234523
lsuffix : string
45244524
Suffix to use from left frame's overlapping columns
45254525
rsuffix : string

0 commit comments

Comments
 (0)