-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
CLN: assorted cleanups #27301
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
CLN: assorted cleanups #27301
Conversation
pandas/core/internals/managers.py
Outdated
@@ -584,6 +584,7 @@ def convert(self, **kwargs): | |||
return self.apply("convert", **kwargs) | |||
|
|||
def replace(self, **kwargs): | |||
assert "value" in kwargs and np.ndim(kwargs["value"]) == 0 |
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.
Does adding this to the signature explicitly not work?
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 it does, but the pattern for the other self.aply usages here is just to have kwargs. I'm OK either way
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.
Yea I think signature would be better if required
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.
changed
@@ -411,7 +411,7 @@ def check_single_invert_op(self, lhs, cmp1, rhs): | |||
) | |||
|
|||
def check_compound_invert_op(self, lhs, cmp1, rhs): | |||
skip_these = "in", "not in" | |||
skip_these = ["in", "not in"] |
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.
Maybe make a tuple for consistency with old code?
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.
Just used for an inclusion check; either way works.
thanks @jbrockmendel |
broken off from other branches