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

DOC: Add RangeIndex to the documentation and fix warnings #26791

Closed
datapythonista opened this issue Jun 11, 2019 · 2 comments
Closed

DOC: Add RangeIndex to the documentation and fix warnings #26791

datapythonista opened this issue Jun 11, 2019 · 2 comments
Labels
Milestone

Comments

@datapythonista
Copy link
Member

datapythonista commented Jun 11, 2019

xref #24173

Looks like we don't have RangeIndex in the documentation, and this is causing warnings:

pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.DataFrame.sparse'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.T'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.array'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.base'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.data'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.dtype'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.dtype_str'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.flags'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.hasnans'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.inferred_type'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.is_all_dates'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.is_monotonic'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.is_unique'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.itemsize'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.nbytes'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.ndim'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.shape'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.size'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.start'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.step'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.stop'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.strides'
pandas\doc\source\reference\index.rst:: WARNING: toctree contains reference to nonexisting document 'reference/api/pandas.RangeIndex.values'

In https://github.com/pandas-dev/pandas/pull/26786/files I'm adding the class, but still will require the methods.

From similar classes I see that we just add to the autosummary the methods specific to the index classes, and not the ones inherited from the parent Index. I guess we want to do the same here, but we need to make sure there are no warnings related to RangeIndex in the docs build.

We also want to make sure the docstring of RangeIndex is correct, and has the appropriate attributes and methods.

@jorisvandenbossche
Copy link
Member

From similar classes I see that we just add to the autosummary the methods specific to the index classes, and not the ones inherited from the parent Index. I guess we want to do the same here

Yep, indeed. Your PR looks fine for that.
Only not sure about the removal of the attributes from the RangeIndex docstring. To get those index specific attributes in the API docs, we need to list them manually (when you use the "class_without_autosummary" template)

@jorisvandenbossche
Copy link
Member

This is fixed in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants