-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REF: combine all alignment into _align_method_FRAME #31288
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.
looks good generally minor things
Co-Authored-By: William Ayd <[email protected]>
Co-Authored-By: William Ayd <[email protected]>
Hello @jbrockmendel! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-01-24 19:59:03 UTC |
pandas/core/ops/__init__.py
Outdated
@@ -609,8 +609,25 @@ def _combine_series_frame(left, right, func, axis: int): | |||
return left._construct_result(new_data) | |||
|
|||
|
|||
def _align_method_FRAME(left, right, axis): | |||
""" convert rhs to meet lhs dims if input is list, tuple or np.ndarray """ | |||
def _align_method_FRAME(left, right, axis, flex: Optional[bool] = False, level: Optional[Label] = None): |
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.
def _align_method_FRAME(left, right, axis, flex: Optional[bool] = False, level: Optional[Label] = None): | |
def _align_method_FRAME(left, right, axis, flex: Optional[bool] = False, level: Optional[Level] = None): |
Sorry typo on previous; we actually have Level defined in pandas._typing already (probably need to import)
thanks |
This puts us within striking distance of de-duplicating _flex_comp_method_FRAME and _comp_method_FRAME, with _arith_method_FRAME not far behind