Skip to content

Update join docs for other param #46850

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 20 commits into from
Jul 21, 2022
Merged
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
22c54af
Update join docs for other param
multimeric Apr 23, 2022
36eec5b
Update type for _join_compat
multimeric Apr 23, 2022
48048db
Allow any iterable for join; test join for a list of series
multimeric May 27, 2022
7811306
Update type signature
multimeric May 27, 2022
bb002f8
Update pd.concat type, add cast() to make frame.join() work with mypy
multimeric May 28, 2022
436f5d3
Fix type union syntax
multimeric Jun 12, 2022
76ead79
NDFrame
multimeric Jun 12, 2022
b12f42e
Remove cast
multimeric Jun 12, 2022
e3c1fd3
Merge branch 'main' of github.com:pandas-dev/pandas into multimeric-p…
multimeric Jun 12, 2022
3b04d62
Fix mypy errors
multimeric Jun 15, 2022
f72bbdd
Merge branch 'main' of github.com:pandas-dev/pandas into multimeric-p…
multimeric Jun 15, 2022
7c1c113
Merge branch 'main' of github.com:pandas-dev/pandas into multimeric-p…
multimeric Jun 16, 2022
0a241c0
Code review
multimeric Jun 17, 2022
e83bace
Merge branch 'main' of github.com:pandas-dev/pandas into multimeric-p…
multimeric Jun 17, 2022
f72a5b5
Remove unnecessary assert
multimeric Jun 17, 2022
6d17dc9
Merge branch 'main' of github.com:pandas-dev/pandas into multimeric-p…
multimeric Jul 18, 2022
75436c8
Add comment explaining the cast
multimeric Jul 18, 2022
f48213f
Fix swapped order of cast comment
multimeric Jul 18, 2022
b79e66c
Remove full stop
multimeric Jul 19, 2022
4ba0ce0
Update pandas/core/frame.py
datapythonista Jul 21, 2022
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 pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -9379,7 +9379,7 @@ def _append(

def join(
self,
other: DataFrame | Series,
other: DataFrame | Series | list[DataFrame | Series],
on: IndexLabel | None = None,
how: str = "left",
lsuffix: str = "",
Expand All @@ -9395,7 +9395,7 @@ def join(

Parameters
----------
other : DataFrame, Series, or list of DataFrame
other : DataFrame, Series, or list of either of these
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should say "or list of DataFrames, Series, or both". "Either of these" implies that it has to be all one type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with "or a list containing any combination of DataFrames and Series", if that's okay

Index should be similar to one of the columns in this one. If a
Series is passed, its name attribute must be set, and that will be
used as the column name in the resulting joined DataFrame.
Expand Down Expand Up @@ -9537,7 +9537,7 @@ def join(

def _join_compat(
self,
other: DataFrame | Series,
other: DataFrame | Series | list[DataFrame | Series],
on: IndexLabel | None = None,
how: str = "left",
lsuffix: str = "",
Expand Down