@@ -81,9 +81,26 @@ index is passed, one will be created having values ``[0, ..., len(data) - 1]``.
81
81
82
82
**From dict **
83
83
84
- If ``data `` is a dict, if **index ** is passed the values in data corresponding
85
- to the labels in the index will be pulled out. Otherwise, an index will be
86
- constructed from the sorted keys of the dict, if possible.
84
+ .. note ::
85
+
86
+ When the data is a dict, and index is not passed, the Series index
87
+ will be ordered by the dict's insertion order, if you're using Python
88
+ version >= 3.6 and Pandas version >= 0.23.
89
+
90
+ If you're using Python < 3.6 or Pandas < 0.23, and index is not passed,
91
+ the Series index will be the lexically ordered list of dict keys.
92
+
93
+ .. ipython :: python
94
+
95
+ d = {' b' : 1 , ' a' : 0 , ' c' : 2 }
96
+ pd.Series(d)
97
+
98
+ If in the example above you were on a Python version lower than 3.6 or a Pandas
99
+ lower than 0.23, the Series would be ordered by the lexical order of the dict
100
+ keys (i.e. ['a', 'b', 'c'] rather than ['b', 'a', 'c']).
101
+
102
+ If an index is passed, the values in data corresponding to the labels in the
103
+ index will be pulled out.
87
104
88
105
.. ipython :: python
89
106
@@ -243,12 +260,21 @@ not matching up to the passed index.
243
260
If axis labels are not passed, they will be constructed from the input data
244
261
based on common sense rules.
245
262
263
+ .. note ::
264
+
265
+ When the data is a dict, and columns is not passed, the DataFrame columns
266
+ will be ordered by the dict's insertion order, if you're using Python
267
+ version >= 3.6 and Pandas >= 0.23.
268
+
269
+ If you're using Python < 3.6 or Pandas < 0.23, and columns is not passed,
270
+ the DataFrame columns will be the lexically ordered list of dict keys.
271
+
246
272
From dict of Series or dicts
247
273
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
248
274
249
275
The resulting **index ** will be the **union ** of the indexes of the various
250
276
Series. If there are any nested dicts, these will first be converted to
251
- Series. If no columns are passed, the columns will be the sorted list of dict
277
+ Series. If no columns are passed, the columns will be the ordered list of dict
252
278
keys.
253
279
254
280
.. ipython :: python
0 commit comments