Re: [Tutor] Python Block

2006-08-12 Thread R. Alan Monroe
> 5100- 3 > 5100 foo 1 > 5200 - 1 > 5200 foo 1 > I want to count the frequency of the second column of data that I can > access. It's kind of the long way around, but putting it into a sql database and doing a groupby query might work. Alan

Re: [Tutor] Python Block

2006-08-12 Thread Alan Gauld
> Hooray, right?! However, my real problem is dealing with another > dimension of data. So suppose I can access the following data: > > "5100", "foo" > "5100", "-" > "5100", "-" > "5100", "-" > "5200", "foo" > "5200", - Hint: Dictionaries can be keyed by tuples too. >( 5100, -) : 3 Does tha

Re: [Tutor] Python Block

2006-08-11 Thread wesley chun
On 8/11/06, Terry Peppers <[EMAIL PROTECTED]> wrote: > I'm really blocked right now, and I don't want to post this to the > main Python list since I think the answer is probably right in front > of my face. I'm clearly just too close to see it. > > "5100", "foo" > "5100", "-" > "5100", "-" > "5100"

[Tutor] Python Block

2006-08-11 Thread Terry Peppers
I'm really blocked right now, and I don't want to post this to the main Python list since I think the answer is probably right in front of my face. I'm clearly just too close to see it. I'm able to do frequency counts of items in a list by doing the following: >>> list = ["5100", "5100", "5100",