-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: dont consolidate in NDFrame._is_numeric_mixed_type #34678
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: dont consolidate in NDFrame._is_numeric_mixed_type #34678
Conversation
presume that these are either neutral or + on perf |
AFAICT. The main upside is getting rid of a side-effect. |
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.
This one will indeed not matter, as just before _is_mixed_type
already consolidated
pandas/core/generic.py
Outdated
@@ -5335,8 +5335,7 @@ def _is_mixed_type(self) -> bool_t: | |||
|
|||
@property | |||
def _is_numeric_mixed_type(self) -> bool_t: | |||
f = lambda: self._mgr.is_numeric_mixed_type | |||
return self._protect_consolidate(f) | |||
return self._mgr.is_numeric_mixed_type |
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.
Since this property is only used in the function right below, I would just inline the self._mgr.is_numeric_mixed_type
there
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.
good idea, will do
…rf-protect_consolidate-less
…rf-protect_consolidate-less
rebased+green |
No description provided.