Skip to content

Commit c530df1

Browse files
committed
switching to default_index()
1 parent 4ef0312 commit c530df1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/indexes/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7473,10 +7473,11 @@ def ensure_index_from_sequences(sequences, names=None) -> Index:
74737473
--------
74747474
ensure_index
74757475
"""
7476+
from pandas.core.indexes.api import default_index
74767477
from pandas.core.indexes.multi import MultiIndex
74777478

74787479
if len(sequences) == 0:
7479-
return Index([])
7480+
return default_index(0)
74807481
elif len(sequences) == 1:
74817482
if names is not None:
74827483
names = names[0]

0 commit comments

Comments
 (0)