Skip to content

Commit fecc07d

Browse files
committed
CLN: remove redundant calls to ensure_index
1 parent d52748c commit fecc07d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/core/frame.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,6 @@ def _init_dict(self, data, index, columns, dtype=None):
453453
# GH10856
454454
# raise ValueError if only scalars in dict
455455
index = extract_index(arrays[~missing])
456-
else:
457-
index = ensure_index(index)
458456

459457
# no obvious "empty" int column
460458
if missing.any() and not is_integer_dtype(dtype):
@@ -7616,7 +7614,7 @@ def _arrays_to_mgr(arrays, arr_names, index, columns, dtype=None):
76167614
arrays = _homogenize(arrays, index, dtype)
76177615

76187616
# from BlockManager perspective
7619-
axes = [ensure_index(columns), ensure_index(index)]
7617+
axes = [ensure_index(columns), index]
76207618

76217619
return create_block_manager_from_arrays(arrays, arr_names, axes)
76227620

0 commit comments

Comments
 (0)