Skip to content

Commit 87d9d5d

Browse files
DOC: fix SA01,ES01 for pandas.RangeIndex.start
1 parent 3a45265 commit 87d9d5d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7676
-i "pandas.Period.to_timestamp SA01" \
7777
-i "pandas.PeriodDtype.freq SA01" \
7878
-i "pandas.RangeIndex.from_range PR01,SA01" \
79-
-i "pandas.RangeIndex.start SA01" \
8079
-i "pandas.RangeIndex.step SA01" \
8180
-i "pandas.RangeIndex.stop SA01" \
8281
-i "pandas.Series.cat.add_categories PR01,PR02" \

pandas/core/indexes/range.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,22 @@ def start(self) -> int:
295295
"""
296296
The value of the `start` parameter (``0`` if this was not supplied).
297297
298+
This property returns the starting value of the `RangeIndex`. If the `start`
299+
value is not explicitly provided during the creation of the `RangeIndex`,
300+
it defaults to 0. The `start` property is part of the `RangeIndex`, which
301+
represents a range of integers in a memory-efficient manner. It is typically
302+
used when you need to generate a sequence of numbers with minimal memory
303+
overhead. The `RangeIndex` is frequently used as the default index for pandas
304+
DataFrames and Series when no explicit index is provided. This property allows
305+
users to access the starting point of the range, which may be useful for
306+
iteration, slicing, or other operations where the starting value is relevant.
307+
308+
See Also
309+
--------
310+
RangeIndex : Immutable index implementing a range-based index.
311+
RangeIndex.stop : Returns the stop value of the `RangeIndex`.
312+
RangeIndex.step : Returns the step value of the `RangeIndex`.
313+
298314
Examples
299315
--------
300316
>>> idx = pd.RangeIndex(5)

0 commit comments

Comments
 (0)