Skip to content

CLN: move code out of a try clause in merge.py #30382

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 1 commit into from
Dec 21, 2019

Conversation

topper-123
Copy link
Contributor

Minor clean-up.

on = [on]

if right.duplicated(by + on).any():
_right = right.drop_duplicates(by + on, keep="last")
Copy link
Member

Choose a reason for hiding this comment

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

no risk of raising in 127/128?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was a risk already, right? This just ensures that a KeyError isn't catched unintended.

Copy link
Member

Choose a reason for hiding this comment

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

makes sense, thanks

@jbrockmendel jbrockmendel merged commit c869255 into pandas-dev:master Dec 21, 2019
@jbrockmendel
Copy link
Member

Thanks @topper-123

@topper-123 topper-123 deleted the cln_merge branch December 21, 2019 20:01
AlexKirko pushed a commit to AlexKirko/pandas that referenced this pull request Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants