Follow me
-
Recent Posts
calendar
Recent Comments
- Stan on python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
- Cormac on Pandas : how to compare dataframe with None
- LP on AWK: the substr command to select a substring
- jrab on python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
- How to disable SSL verification for urlretrieve? – Peter's blog on python: certificate verified failed
Archives
Categories
Meta
Daily Archives: December 29, 2017
How to sort a dictionary by values in Python
By definition, dictionary are not sorted (to speed up access). Let us consider the following dictionary, which stores the age of several persons as values: d = {"Pierre": 42, "Anne": 33, "Zoe": 24}d = {"Pierre": 42, "Anne": 33, "Zoe": 24} … Continue reading