Skip to content

Commit 759dd8c

Browse files
committed
If Series is called with no arguments, let it have a RangeIndex by default
1 parent 7495e9a commit 759dd8c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/series.py

+2
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ def __init__(self, data=None, index=None, dtype=None, name=None,
173173

174174
if data is None:
175175
data = {}
176+
if index is None:
177+
index = _default_index(0)
176178
if dtype is not None:
177179
dtype = self._validate_dtype(dtype)
178180

0 commit comments

Comments
 (0)