Skip to content

Commit 927b695

Browse files
jorisvandenbosschejbrockmendel
authored andcommitted
PERF: fix placement when slicing a Series (pandas-dev#33324)
1 parent b44021d commit 927b695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/internals/managers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,7 @@ def get_slice(self, slobj: slice, axis: int = 0) -> "SingleBlockManager":
15681568

15691569
blk = self._block
15701570
array = blk._slice(slobj)
1571-
block = blk.make_block_same_class(array, placement=range(len(array)))
1571+
block = blk.make_block_same_class(array, placement=slice(0, len(array)))
15721572
return type(self)(block, self.index[slobj])
15731573

15741574
@property

0 commit comments

Comments
 (0)