Skip to content

DOC: RangeIndex as default index #19781

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

Merged
merged 2 commits into from
Feb 22, 2018

Conversation

max-sixty
Copy link
Contributor

Small correction to DataFrame docstring

no indexing information part of input data and no index provided
columns : Index or array-like
Column labels to use for resulting frame. Will default to
np.arange(n) if no column labels are provided
RangeIndex if no column labels are provided
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can u check Series doc string as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Series is good already

@@ -251,11 +251,11 @@ class DataFrame(NDFrame):
data : numpy ndarray (structured or homogeneous), dict, or DataFrame
Dict can contain Series, arrays, constants, or list-like objects
index : Index or array-like
Index to use for resulting frame. Will default to np.arange(n) if
Index to use for resulting frame. Will default to RangeIndex if
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think many people are not that familiar with the concept of "RangeIndex". Therefore, maybe we can leave the origin arange(n) after it between brackets? Or something like "RangeIndex (values 0, 1, 2, ..., n)"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do RangeIndex (0, 1, 2, ..., n)?

Some may not know arange(n) either

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxim-lian your suggestion looks good. pls ping when ready. (and update Series to similar)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was indeed a good suggestion!

@codecov
Copy link

codecov bot commented Feb 20, 2018

Codecov Report

Merging #19781 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19781      +/-   ##
==========================================
- Coverage   91.61%    91.6%   -0.01%     
==========================================
  Files         150      150              
  Lines       48887    48887              
==========================================
- Hits        44786    44784       -2     
- Misses       4101     4103       +2
Flag Coverage Δ
#multiple 89.98% <ø> (-0.01%) ⬇️
#single 41.8% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/frame.py 97.22% <ø> (ø) ⬆️
pandas/util/testing.py 83.64% <0%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af5e8ec...2f085a7. Read the comment docs.

@max-sixty
Copy link
Contributor Author

Unrelated test failures: https://travis-ci.org/maxim-lian/pandas/jobs/344592059

@jreback jreback added this to the 0.23.0 milestone Feb 22, 2018
@jreback jreback merged commit 820b4d0 into pandas-dev:master Feb 22, 2018
@jreback
Copy link
Contributor

jreback commented Feb 22, 2018

thanks!

harisbal pushed a commit to harisbal/pandas that referenced this pull request Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants