Skip to content

Commit 19725a4

Browse files
committed
Revert "DOC GH22897 Fix additional formatting issues in pandas/core/frame.py"
This reverts commit 8139490.
1 parent 8139490 commit 19725a4

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

pandas/core/frame.py

+20-21
Original file line numberDiff line numberDiff line change
@@ -6442,8 +6442,8 @@ def join(self, other, on=None, how='left', lsuffix='', rsuffix='',
64426442
"""
64436443
Join columns of another DataFrame.
64446444
6445-
Join columns with `other` DataFrame either on index or on a key
6446-
column. Efficiently join multiple DataFrame objects by index at once by
6445+
Join columns with other DataFrame either on index or on a key
6446+
column. Efficiently Join multiple DataFrame objects by index at once by
64476447
passing a list.
64486448
64496449
Parameters
@@ -6452,43 +6452,38 @@ def join(self, other, on=None, how='left', lsuffix='', rsuffix='',
64526452
Index should be similar to one of the columns in this one. If a
64536453
Series is passed, its name attribute must be set, and that will be
64546454
used as the column name in the resulting joined DataFrame.
6455-
on : str, list of str, or array-like, optional
6455+
on : str, list of str, or array-like
64566456
Column or index level name(s) in the caller to join on the index
64576457
in `other`, otherwise joins index-on-index. If multiple
64586458
values given, the `other` DataFrame must have a MultiIndex. Can
64596459
pass an array as the join key if it is not already contained in
64606460
the calling DataFrame. Like an Excel VLOOKUP operation.
6461-
how : {'left', 'right', 'outer', 'inner'}, default 'left'
6461+
how : {'left', 'right', 'outer', 'inner'}, default: 'left'
64626462
How to handle the operation of the two objects.
64636463
64646464
* left: use calling frame's index (or column if on is specified)
6465-
* right: use `other`'s index.
6465+
* right: use other frame's index.
64666466
* outer: form union of calling frame's index (or column if on is
6467-
specified) with `other`'s index, and sort it.
6467+
specified) with other frame's index, and sort it.
64686468
lexicographically.
64696469
* inner: form intersection of calling frame's index (or column if
6470-
on is specified) with `other`'s index, preserving the order
6470+
on is specified) with other frame's index, preserving the order
64716471
of the calling's one.
6472-
lsuffix : str, default ''
6472+
lsuffix : str
64736473
Suffix to use from left frame's overlapping columns.
6474-
rsuffix : str, default ''
6474+
rsuffix : str
64756475
Suffix to use from right frame's overlapping columns.
64766476
sort : bool, default False
64776477
Order result DataFrame lexicographically by the join key. If False,
64786478
the order of the join key depends on the join type (how keyword).
64796479
6480-
Returns
6481-
-------
6482-
DataFrame
6483-
A dataframe containing columns from both the caller and `other`.
6484-
64856480
Notes
64866481
-----
6487-
Options `on`, `lsuffix`, and `rsuffix` options are not supported
6488-
when passing a list of DataFrame objects.
6482+
on, lsuffix, and rsuffix options are not supported when passing a list
6483+
of DataFrame objects
64896484
64906485
Support for specifying index levels as the `on` parameter was added
6491-
in version 0.23.0.
6486+
in version 0.23.0
64926487
64936488
See Also
64946489
--------
@@ -6530,7 +6525,7 @@ def join(self, other, on=None, how='left', lsuffix='', rsuffix='',
65306525
5 K5 A5 NaN NaN
65316526
65326527
If we want to join using the key columns, we need to set key to be
6533-
the index in both `df` and `other`. The joined DataFrame will have
6528+
the index in both df and other. The joined DataFrame will have
65346529
key as its index.
65356530
65366531
>>> df.set_index('key').join(other.set_index('key'))
@@ -6543,9 +6538,9 @@ def join(self, other, on=None, how='left', lsuffix='', rsuffix='',
65436538
K4 A4 NaN
65446539
K5 A5 NaN
65456540
6546-
Another option to join using the key columns is to use the `on`
6547-
parameter. DataFrame.join always uses `other`'s index but we can use
6548-
any column in `df`. This method preserves the original DataFrame's
6541+
Another option to join using the key columns is to use the on
6542+
parameter. DataFrame.join always uses other's index but we can use any
6543+
column in df. This method preserves the original DataFrame's
65496544
index in the result.
65506545
65516546
>>> df.join(other.set_index('key'), on='key')
@@ -6556,6 +6551,10 @@ def join(self, other, on=None, how='left', lsuffix='', rsuffix='',
65566551
3 K3 A3 NaN
65576552
4 K4 A4 NaN
65586553
5 K5 A5 NaN
6554+
6555+
Returns
6556+
-------
6557+
joined : DataFrame
65596558
"""
65606559
# For SparseDataFrame's benefit
65616560
return self._join_compat(other, on=on, how=how, lsuffix=lsuffix,

0 commit comments

Comments
 (0)