Skip to content

TYP and DOC: pd.merge accepts Series #41594

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 6 commits into from
May 24, 2021

Conversation

Dr-Irv
Copy link
Contributor

@Dr-Irv Dr-Irv commented May 20, 2021

I noticed that the docs for pd.merge() and pd.merge_asof() were requiring the first argument to be a DataFrame, but in fact, they can be a Series. This PR updates the docs and the types to fix that issue.

Didn't think a whatsnew entry was needed, and I skipped creating an issue, but will do so if required.

Copy link
Member

@lithomas1 lithomas1 left a comment

Choose a reason for hiding this comment

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

I think you should use DataFrame | Series instead of FrameOrSeriesUnion. (See #40876 for more context)

@Dr-Irv
Copy link
Contributor Author

Dr-Irv commented May 21, 2021

I think you should use DataFrame | Series instead of FrameOrSeriesUnion. (See #40876 for more context)

Thanks for pointing that out. Have now changed it.

@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label May 21, 2021
@jreback jreback added this to the 1.3 milestone May 21, 2021
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm

@jreback
Copy link
Contributor

jreback commented May 21, 2021

cc @simonjayhawkins if any comments.

Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

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

Thanks @Dr-Irv

@simonjayhawkins simonjayhawkins added the Reshaping Concat, Merge/Join, Stack/Unstack, Explode label May 22, 2021
@simonjayhawkins
Copy link
Member

Thanks @Dr-Irv

@Dr-Irv Dr-Irv deleted the mergedocs branch May 24, 2021 11:47
TLouf pushed a commit to TLouf/pandas that referenced this pull request Jun 1, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reshaping Concat, Merge/Join, Stack/Unstack, Explode Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants