Skip to content

DOC: fix SA01,ES01 for pandas.RangeIndex.start #59728

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
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Period.to_timestamp SA01" \
-i "pandas.PeriodDtype.freq SA01" \
-i "pandas.RangeIndex.from_range PR01,SA01" \
-i "pandas.RangeIndex.start SA01" \
-i "pandas.RangeIndex.step SA01" \
-i "pandas.RangeIndex.stop SA01" \
-i "pandas.Series.cat.add_categories PR01,PR02" \
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/indexes/range.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,16 @@ def start(self) -> int:
"""
The value of the `start` parameter (``0`` if this was not supplied).

This property returns the starting value of the `RangeIndex`. If the `start`
Copy link
Member

@mroeschke mroeschke Sep 6, 2024

Choose a reason for hiding this comment

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

Could we make this just 2 sentences? I think the information describing the RangeIndex is superfluous.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

value is not explicitly provided during the creation of the `RangeIndex`,
it defaults to 0.

See Also
--------
RangeIndex : Immutable index implementing a range-based index.
RangeIndex.stop : Returns the stop value of the `RangeIndex`.
RangeIndex.step : Returns the step value of the `RangeIndex`.

Examples
--------
>>> idx = pd.RangeIndex(5)
Expand Down
Loading