Skip to content

Commit 52a1ff8

Browse files
committed
changes
1 parent 8b986d6 commit 52a1ff8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/core/internals/construction.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,12 @@ def init_dict(data, index, columns, dtype=None):
195195
arrays.loc[missing] = [val] * missing.sum()
196196

197197
else:
198-
data = OrderedDict((col_name, com.maybe_itarable_to_list(col))
199-
for col_name, col in data.items())
200198
keys = com.dict_keys_to_ordered_list(data)
201199
columns = data_names = Index(keys)
202200
# GH#24096 need copy to be deep for datetime64tz case
203201
# TODO: See if we can avoid these copies
204-
arrays = [data[k] if not is_datetime64tz_dtype(data[k]) else
202+
arrays = [com.maybe_itarable_to_list(data[k]) if
203+
not is_datetime64tz_dtype(data[k]) else
205204
data[k].copy(deep=True) for k in keys]
206205
return arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
207206

0 commit comments

Comments
 (0)