Skip to content

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

Merged
merged 4 commits into from
Jun 15, 2020

Conversation

jbrockmendel
Copy link
Member

No description provided.

@jreback jreback added the Performance Memory or execution speed performance label Jun 9, 2020
@jreback jreback added this to the 1.1 milestone Jun 9, 2020
@jreback
Copy link
Contributor

jreback commented Jun 9, 2020

presume that these are either neutral or + on perf

@jbrockmendel
Copy link
Member Author

presume that these are either neutral or + on perf

AFAICT. The main upside is getting rid of a side-effect.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a 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

@@ -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
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, will do

@jbrockmendel
Copy link
Member Author

rebased+green

@jreback jreback merged commit 6d2505b into pandas-dev:master Jun 15, 2020
@jbrockmendel jbrockmendel deleted the perf-protect_consolidate-less branch June 15, 2020 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants