Materials and IPython notebooks for "Python for Data Analysis" by Wes McKinney, published by O'Reilly Media
22.27k
stars
15.19k
forks
source link
Ch 05: Changes to Python 3.6+ dict insertion order sorting and DataFrame instantiation #145
Closed
jslatane closed 3 years ago
On page 134, there is the example of creating a DataFrame from nested dicts:
Then it shows the output as this:
But this is working off old behavior. In Python 3.6+, dicts are ordered by insertion order and that order is preserved when instantiating DataFrames from dicts.. So running the first block above now results in this output instead:
Some of the accompanying text should be changed to reflect this, for example on page 135 it says: