You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, columns that were categorical, but not the groupby key(s) would be converted to ``object`` dtype during groupby operations. Pandas now will preserve these dtypes. (:issue:`18502`)
406
406
@@ -740,6 +740,47 @@ consistent with NumPy and the rest of pandas (:issue:`21801`).
740
740
cat.argsort()
741
741
cat[cat.argsort()]
742
742
743
+
.. _whatsnew_0250.api_breaking.list_of_dict:
744
+
745
+
Column order is preserved when passing a list of dicts to DataFrame
Starting with Python 3.7 the key-order of ``dict``is`guaranteed <https://mail.python.org/pipermail/python-dev/2017-December/151283.html>`_. In practice, this has been true since
749
+
Python 3.6. The :class:`DataFrame` constructor now treats a list of dicts in the same way as
750
+
it does a list of ``OrderedDict``, i.e. preserving the order of the dicts.
751
+
This change applies only when pandas is running on Python>=3.6 (:issue:`27309`).
0 commit comments