Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: .reset_index() should create a RangeIndex #12071

Closed
jreback opened this issue Jan 17, 2016 · 2 comments
Closed

BUG: .reset_index() should create a RangeIndex #12071

jreback opened this issue Jan 17, 2016 · 2 comments
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jan 17, 2016

In [10]: df = DataFrame({'A' : range(5)})

In [11]: df
Out[11]: 
   A
0  0
1  1
2  2
3  3
4  4

In [12]: df.index
Out[12]: RangeIndex(start=0, stop=5, step=1)

In [13]: df.reset_index()
Out[13]: 
   index  A
0      0  0
1      1  1
2      2  2
3      3  3
4      4  4

In [14]: df.reset_index().index
Out[14]: Int64Index([0, 1, 2, 3, 4], dtype='int64')
@jreback jreback added Bug Indexing Related to indexing on series/frames, not to indexes themselves Difficulty Intermediate labels Jan 17, 2016
@jreback jreback added this to the 0.18.0 milestone Jan 17, 2016
@boombard
Copy link
Contributor

I will take a stab at this.

@jreback
Copy link
Contributor Author

jreback commented Jan 20, 2016

closed by #12080

@jreback jreback closed this as completed Jan 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants