Skip to content

Commit 38d8ef5

Browse files
committed
read_excel: optimization
ixmap was being always converted into a list. Now if it is a range it is left unchanged.
1 parent c2dab1b commit 38d8ef5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/io/excel/_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,9 +831,9 @@ def _parse_sheet(
831831
# create an index map from the without-skiprows to the
832832
# original indexes.
833833
if skiprows is None:
834-
ixmap = list(range(len(data)))
834+
ixmap = range(len(data))
835835
elif is_integer(skiprows):
836-
ixmap = list(range(skiprows, len(data)))
836+
ixmap = range(skiprows, len(data))
837837
elif is_list_like(skiprows):
838838
skiprows_set = set(cast(Sequence[int], skiprows))
839839
ixmap = [ix for ix in range(len(data)) if ix not in skiprows_set]
Binary file not shown.

0 commit comments

Comments
 (0)