Skip to content

CLN: Don't create _join_functions #32336

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
Mar 3, 2020
Merged
Changes from all commits
Commits
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
15 changes: 6 additions & 9 deletions pandas/core/reshape/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,12 @@ def _get_join_indexers(
kwargs = copy.copy(kwargs)
if how == "left":
kwargs["sort"] = sort
join_func = _join_functions[how]
join_func = {
"inner": libjoin.inner_join,
"left": libjoin.left_outer_join,
"right": _right_outer_join,
"outer": libjoin.full_outer_join,
}[how]

return join_func(lkey, rkey, count, **kwargs)

Expand Down Expand Up @@ -1842,14 +1847,6 @@ def _right_outer_join(x, y, max_groups):
return left_indexer, right_indexer


_join_functions = {
"inner": libjoin.inner_join,
"left": libjoin.left_outer_join,
"right": _right_outer_join,
"outer": libjoin.full_outer_join,
}


def _factorize_keys(lk, rk, sort=True):
# Some pre-processing for non-ndarray lk / rk
if is_datetime64tz_dtype(lk) and is_datetime64tz_dtype(rk):
Expand Down