Skip to content

ERR: disallow RangeIndex() #13793

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

Closed
jreback opened this issue Jul 25, 2016 · 2 comments
Closed

ERR: disallow RangeIndex() #13793

jreback opened this issue Jul 25, 2016 · 2 comments
Labels
API Design Error Reporting Incorrect or improved errors from pandas Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jul 25, 2016

xref #13749

this is not consistent with other Indexes where we don't allow them to be constructed with no data passed (it can be None), but that's the idea. start must be not-None.

IOW this should raise ValueError

In [3]: pd.RangeIndex()
Out[3]: RangeIndex(start=0, stop=0, step=1)
@jreback jreback added Indexing Related to indexing on series/frames, not to indexes themselves Difficulty Novice API Design Error Reporting Incorrect or improved errors from pandas labels Jul 25, 2016
@jreback jreback added this to the Next Major Release milestone Jul 25, 2016
@sinhrks
Copy link
Member

sinhrks commented Jul 26, 2016

will send a PR soon. Shouldn't the error be TypeError compat with Index?

pd.Index(None)
# TypeError: Index(...) must be called with a collection of some kind, None was pa
ssed

@jreback
Copy link
Contributor Author

jreback commented Jul 26, 2016

yep - was looking at something else

@jreback jreback modified the milestones: 0.19.0, Next Major Release Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Error Reporting Incorrect or improved errors from pandas 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