Skip to content

REF: BlockManager.combine -> _combine #33294

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 1 commit into from
Apr 5, 2020
Merged
Changes from all 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
8 changes: 4 additions & 4 deletions pandas/core/internals/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ def get_bool_data(self, copy: bool = False) -> "BlockManager":
Whether to copy the blocks
"""
self._consolidate_inplace()
return self.combine([b for b in self.blocks if b.is_bool], copy)
return self._combine([b for b in self.blocks if b.is_bool], copy)

def get_numeric_data(self, copy: bool = False) -> "BlockManager":
"""
Expand All @@ -739,9 +739,9 @@ def get_numeric_data(self, copy: bool = False) -> "BlockManager":
Whether to copy the blocks
"""
self._consolidate_inplace()
return self.combine([b for b in self.blocks if b.is_numeric], copy)
return self._combine([b for b in self.blocks if b.is_numeric], copy)

def combine(self, blocks: List[Block], copy: bool = True) -> "BlockManager":
def _combine(self, blocks: List[Block], copy: bool = True) -> "BlockManager":
""" return a new manager with the blocks """
if len(blocks) == 0:
return self.make_empty()
Expand Down Expand Up @@ -896,7 +896,7 @@ def to_dict(self, copy: bool = True):
for b in self.blocks:
bd.setdefault(str(b.dtype), []).append(b)

return {dtype: self.combine(blocks, copy=copy) for dtype, blocks in bd.items()}
return {dtype: self._combine(blocks, copy=copy) for dtype, blocks in bd.items()}

def fast_xs(self, loc: int) -> ArrayLike:
"""
Expand Down