-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TYP : DataFrame.(merge, join) core.reshape.merge.(merge, ...) (easy) #38468
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
Conversation
looks good. @simonjayhawkins if you can double check here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @arw2019 lgtm
in _join_compat
, on
is passed onto left_on
in core.reshape.merge
.
presumably both left_on
and right_on
can also be typed as Optional[IndexLabel]
(in DataFrame.merge, core.reshape.merge and _MergeOperation)
pandas/core/frame.py
Outdated
left_index: bool = False, | ||
right_index: bool = False, | ||
sort: bool = False, | ||
suffixes: Tuple[str, str] = ("_x", "_y"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI. suffixes can currently be list-like but will change in the future. but I think OK to restrict to tuple here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth creating a Suffix alias? (So there's a single place where the behavior can be changed?) I would also change this to List if doing that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, probably worth creating an alias as used in several places.
I don't think we need to include Sequence though (situation maybe different if types were public/not experimental or we were using a stub that had support for multiple pandas versions).
thanks @arw2019 |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff