File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 10
10
from pandas ._libs import lib
11
11
from pandas ._libs .tslibs import IncompatibleFrequency , OutOfBoundsDatetime
12
12
from pandas .compat import raise_with_traceback
13
+ import pandas .compat as compat
13
14
14
15
from pandas .core .dtypes .cast import (
15
16
construct_1d_arraylike_from_scalar , construct_1d_ndarray_preserving_na ,
@@ -291,6 +292,8 @@ def extract_index(data):
291
292
indexes .append (val .index )
292
293
elif isinstance (val , dict ):
293
294
have_dicts = True
295
+ if isinstance (val , OrderedDict ):
296
+ have_ordered = True
294
297
indexes .append (list (val .keys ()))
295
298
elif is_list_like (val ) and getattr (val , 'ndim' , 1 ) == 1 :
296
299
have_raw_arrays = True
@@ -303,7 +306,8 @@ def extract_index(data):
303
306
if have_series :
304
307
index = _union_indexes (indexes )
305
308
elif have_dicts :
306
- index = _union_indexes (indexes , sort = False )
309
+ index = _union_indexes (indexes ,
310
+ sort = not (compat .PY36 or have_ordered ))
307
311
308
312
if have_raw_arrays :
309
313
lengths = list (set (raw_lengths ))
You can’t perform that action at this time.
0 commit comments