Skip to content

Commit

Permalink
stata range index
Browse files Browse the repository at this point in the history
  • Loading branch information
Terji Petersen authored and Terji Petersen committed Nov 16, 2022
1 parent bc26166 commit 73bde44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/io/stata.py
Expand Up @@ -1725,7 +1725,7 @@ def read(
# If index is not specified, use actual row number rather than
# restarting at 0 for each chunk.
if index_col is None:
rng = np.arange(self._lines_read - read_lines, self._lines_read)
rng = range(self._lines_read - read_lines, self._lines_read)
data.index = Index(rng) # set attr instead of set_index to avoid copy

if columns is not None:
Expand Down

0 comments on commit 73bde44

Please sign in to comment.