-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN/TYP: remove unused arguments in merge #40513
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
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 @mzeitlin11 for the PR.
pandas/core/reshape/merge.py
Outdated
how: str = "left", | ||
): | ||
) -> np.ndarray: |
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.
The docstring for Index.take says that a np.ndarray is returned, but it appears that is not the case.
>>> idx
RangeIndex(start=0, stop=3, step=1)
>>>
>>> idx.take([1])
Int64Index([1], dtype='int64')
>>>
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 for noticing this, opened #40521 to address
pandas/core/reshape/merge.py
Outdated
join_index: MultiIndex, | ||
lindexer: np.ndarray, | ||
rindexer: np.ndarray, | ||
) -> Tuple[List[Index], np.ndarray, List[str]]: |
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.
Can you update the docstring to match for the return type of 'names of combined multiindexes'
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.
Updated docstring. Plan to take a much deeper dive into this code in followups, will try to clean up more inconsistencies once I have a better handle on what's going on here.
pandas/core/reshape/merge.py
Outdated
@@ -1583,7 +1578,6 @@ def __init__( | |||
right_index: bool = False, | |||
axis: int = 1, | |||
suffixes: Suffixes = ("_x", "_y"), | |||
copy: bool = True, |
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.
I think this should be retained since in the base class _MergeOperation.__init__
.
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.
Reverted these changes
thanks @mzeitlin11 |
No description provided.