Skip to content

Commit

Permalink
PERF: fix placement when slicing a Series (pandas-dev#33324)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored Apr 6, 2020
1 parent f4281ca commit 1e5afdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/core/internals/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ def get_slice(self, slobj: slice, axis: int = 0) -> "SingleBlockManager":

blk = self._block
array = blk._slice(slobj)
block = blk.make_block_same_class(array, placement=range(len(array)))
block = blk.make_block_same_class(array, placement=slice(0, len(array)))
return type(self)(block, self.index[slobj])

@property
Expand Down

0 comments on commit 1e5afdc

Please sign in to comment.