From b88a79a1507d421cad93a6689106ecb28a558d39 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Mon, 19 Feb 2018 22:02:57 -0500 Subject: [PATCH 1/2] small correction to df constructor docstring --- pandas/core/frame.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index b96af6af3707f..3738ddbdc53e6 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -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 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 dtype : dtype, default None Data type to force. Only a single dtype is allowed. If None, infer copy : boolean, default False From 2f085a7c4c49c034f6d641888dd67bf52d3738f8 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Wed, 21 Feb 2018 19:27:34 -0500 Subject: [PATCH 2/2] Change based on @jorisvandenbossche comment --- pandas/core/frame.py | 2 +- pandas/core/series.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 3738ddbdc53e6..b25dbe4fac6da 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -255,7 +255,7 @@ class DataFrame(NDFrame): 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 - RangeIndex if no column labels are provided + RangeIndex (0, 1, 2, ..., n) if no column labels are provided dtype : dtype, default None Data type to force. Only a single dtype is allowed. If None, infer copy : boolean, default False diff --git a/pandas/core/series.py b/pandas/core/series.py index 90dc14836ab55..b54b95d986b97 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -131,7 +131,7 @@ class Series(base.IndexOpsMixin, generic.NDFrame): index : array-like or Index (1d) Values must be hashable and have the same length as `data`. Non-unique index values are allowed. Will default to - RangeIndex(len(data)) if not provided. If both a dict and index + RangeIndex (0, 1, 2, ..., n) if not provided. If both a dict and index sequence are used, the index will override the keys found in the dict. dtype : numpy.dtype or None