Skip to content
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