Re: [Tutor] Sorting Dictionary of Dictionary by certain Value

2008-09-25 Thread Joe
Thanks to Kent Johnson, Robert Berman, Bill Campbell and John Fouhy for the replies. They have been useful. Kent Johnson wrote: On Tue, Sep 23, 2008 at 8:41 PM, Joe Python <[EMAIL PROTECTED]> wrote: Hi Pythonistas, I have a large dictionary of dictionary (50,000+ keys) which has

Re: [Tutor] Sorting Dictionary of Dictionary by certain Value

2008-09-24 Thread Hansen, Mike
> -Original Message- > Hi Pythonistas, > > I have a large dictionary of dictionary (50,000+ keys) which > has a structure as follows: > DoD = { > 'flintstones' : { > 'husband' : "fred", > 'pal' : "barney", > 'income': 500, > }, > 'jetso

Re: [Tutor] Sorting Dictionary of Dictionary by certain Value

2008-09-23 Thread Kent Johnson
On Tue, Sep 23, 2008 at 8:41 PM, Joe Python <[EMAIL PROTECTED]> wrote: > Hi Pythonistas, > > I have a large dictionary of dictionary (50,000+ keys) which has a structure > as follows: > DoD = { > 'flintstones' : { > 'husband' : "fred", > 'pal' : "barney", > '

Re: [Tutor] Sorting Dictionary of Dictionary by certain Value

2008-09-23 Thread Robert Berman
This might help you. http://blog.modp.com/2008/09/sorting-python-dictionary-by-value-take.html Robert Joe Python wrote: Hi Pythonistas, I have a large dictionary of dictionary (50,000+ keys) which has a structure as follows: DoD = {     'flintstones' : {     'husband'   : "fre

Re: [Tutor] Sorting Dictionary of Dictionary by certain Value

2008-09-23 Thread Bill Campbell
On Tue, Sep 23, 2008, Bill Campbell wrote: >On Wed, Sep 24, 2008, John Fouhy wrote: >>2008/9/24 Joe Python <[EMAIL PROTECTED]>: >>> Hi Pythonistas, >>> >>> I have a large dictionary of dictionary (50,000+ keys) which has a structure >>> as follows: >>[snip] >>> I want to sort the dictionary by 'inc

Re: [Tutor] Sorting Dictionary of Dictionary by certain Value

2008-09-23 Thread Bill Campbell
On Wed, Sep 24, 2008, John Fouhy wrote: >2008/9/24 Joe Python <[EMAIL PROTECTED]>: >> Hi Pythonistas, >> >> I have a large dictionary of dictionary (50,000+ keys) which has a structure >> as follows: >[snip] >> I want to sort the dictionary by 'income' >> Is there an efficient way to do the same. >

Re: [Tutor] Sorting Dictionary of Dictionary by certain Value

2008-09-23 Thread John Fouhy
2008/9/24 Joe Python <[EMAIL PROTECTED]>: > Hi Pythonistas, > > I have a large dictionary of dictionary (50,000+ keys) which has a structure > as follows: [snip] > I want to sort the dictionary by 'income' > Is there an efficient way to do the same. Note that you cannot sort a dictionary. The bes

[Tutor] Sorting Dictionary of Dictionary by certain Value

2008-09-23 Thread Joe Python
Hi Pythonistas, I have a large dictionary of dictionary (50,000+ keys) which has a structure as follows: DoD = { 'flintstones' : { 'husband' : "fred", 'pal' : "barney", 'income': 500, }, 'jetsons' : { 'husband' : "george", 'wif