Skip to content

Commit ab48369

Browse files
max-sixtyharisbal
authored and
harisbal
committed
DOC: RangeIndex as default index (pandas-dev#19781)
1 parent 11c14e1 commit ab48369

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/core/frame.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,11 @@ class DataFrame(NDFrame):
251251
data : numpy ndarray (structured or homogeneous), dict, or DataFrame
252252
Dict can contain Series, arrays, constants, or list-like objects
253253
index : Index or array-like
254-
Index to use for resulting frame. Will default to np.arange(n) if
254+
Index to use for resulting frame. Will default to RangeIndex if
255255
no indexing information part of input data and no index provided
256256
columns : Index or array-like
257257
Column labels to use for resulting frame. Will default to
258-
np.arange(n) if no column labels are provided
258+
RangeIndex (0, 1, 2, ..., n) if no column labels are provided
259259
dtype : dtype, default None
260260
Data type to force. Only a single dtype is allowed. If None, infer
261261
copy : boolean, default False

pandas/core/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class Series(base.IndexOpsMixin, generic.NDFrame):
131131
index : array-like or Index (1d)
132132
Values must be hashable and have the same length as `data`.
133133
Non-unique index values are allowed. Will default to
134-
RangeIndex(len(data)) if not provided. If both a dict and index
134+
RangeIndex (0, 1, 2, ..., n) if not provided. If both a dict and index
135135
sequence are used, the index will override the keys found in the
136136
dict.
137137
dtype : numpy.dtype or None

0 commit comments

Comments
 (0)