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
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5333,15 +5333,10 @@ def _is_mixed_type(self) -> bool_t:
f = lambda: self._mgr.is_mixed_type
return self._protect_consolidate(f)

@property
def _is_numeric_mixed_type(self) -> bool_t:
f = lambda: self._mgr.is_numeric_mixed_type
return self._protect_consolidate(f)

def _check_inplace_setting(self, value) -> bool_t:
""" check whether we allow in-place setting with this type of value """
if self._is_mixed_type:
if not self._is_numeric_mixed_type:
if not self._mgr.is_numeric_mixed_type:

# allow an actual np.nan thru
if is_float(value) and np.isnan(value):
Expand Down