On Sun, 14 Mar 2010 08:36:55 -0400 Steve Holden
wrote:
> Andreas Waldenburger wrote:
> > On Sat, 13 Mar 2010 13:42:12 -0800 (PST) vsoler
> > wrote:
> >
> >> By the way, I suppose I am the OP. Since I am not an native English
> >> speaking person, I do not know what it stands for. Perhaps you ca
Andreas Waldenburger wrote:
> On Sat, 13 Mar 2010 13:42:12 -0800 (PST) vsoler
> wrote:
>
>> By the way, I suppose I am the OP. Since I am not an native English
>> speaking person, I do not know what it stands for. Perhaps you can
>> tell me.
>>
> Perhaps you can find out yourself:
>
> http://www
On Sat, 13 Mar 2010 13:42:12 -0800 (PST) vsoler
wrote:
> By the way, I suppose I am the OP. Since I am not an native English
> speaking person, I do not know what it stands for. Perhaps you can
> tell me.
>
Perhaps you can find out yourself:
http://www.urbandictionary.com/define.php?term=op
/W
On Mar 13, 2:42 pm, vsoler wrote:
> By the way, I suppose I am the OP. Since I am not an native English
> speaking person, I do not know what it stands for. Perhaps you can
> tell me.
OP means Original Poster (the person who started the discussion)
or sometimes Original Post, depending on contex
On 13 mar, 18:16, ru...@yahoo.com wrote:
> On Mar 13, 9:26 am, ru...@yahoo.com wrote:> That should be:
> > d = {}
> > for item in m:
>
> key = item[0]; value = item[1]
>
> > if key is None or value is None: continue
> > if key not in dict:
> > d[key] = [1, value]
> > else
On Mar 13, 9:26 am, ru...@yahoo.com wrote:
> That should be:
> d = {}
> for item in m:
key = item[0]; value = item[1]
> if key is None or value is None: continue
> if key not in dict:
> d[key] = [1, value]
> else:
> d[key][0] += 1
> d[key][1] += value
Tha
On Mar 13, 9:13 am, ru...@yahoo.com wrote:
> On Mar 13, 8:28 am, Patrick Maupin wrote:
>
>
>
> > On Mar 13, 9:05 am, vsoler wrote:
>
> > > Say that "m" is a tuple of 2-tuples
>
> > > m=(('as',3), ('ab',5), (None, 1), ('as',None), ('as',6))
>
> > > and I need to build a "d" dict where each key has
On Mar 13, 8:28 am, Patrick Maupin wrote:
> On Mar 13, 9:05 am, vsoler wrote:
>
> > Say that "m" is a tuple of 2-tuples
>
> > m=(('as',3), ('ab',5), (None, 1), ('as',None), ('as',6))
>
> > and I need to build a "d" dict where each key has an associated list
> > whose first element is the count, a
On 13 Mar, 15:28, Patrick Maupin wrote:
> On Mar 13, 9:05 am, vsoler wrote:
>
> > Say that "m" is a tuple of 2-tuples
>
> > m=(('as',3), ('ab',5), (None, 1), ('as',None), ('as',6))
>
> > and I need to build a "d" dict where each key has an associated list
> > whose first element is the count, and
vsoler wrote:
> Say that "m" is a tuple of 2-tuples
>
> m=(('as',3), ('ab',5), (None, 1), ('as',None), ('as',6))
>
> and I need to build a "d" dict where each key has an associated list
> whose first element is the count, and the second is the sum. If a 2-
> tuple contains a None value, it should
On Mar 13, 9:05 am, vsoler wrote:
> Say that "m" is a tuple of 2-tuples
>
> m=(('as',3), ('ab',5), (None, 1), ('as',None), ('as',6))
>
> and I need to build a "d" dict where each key has an associated list
> whose first element is the count, and the second is the sum. If a 2-
> tuple contains a No
On 13 Mar, 15:05, vsoler wrote:
> Say that "m" is a tuple of 2-tuples
>
> m=(('as',3), ('ab',5), (None, 1), ('as',None), ('as',6))
>
> and I need to build a "d" dict where each key has an associated list
> whose first element is the count, and the second is the sum. If a 2-
> tuple contains a None
Say that "m" is a tuple of 2-tuples
m=(('as',3), ('ab',5), (None, 1), ('as',None), ('as',6))
and I need to build a "d" dict where each key has an associated list
whose first element is the count, and the second is the sum. If a 2-
tuple contains a None value, it should be discarded.
The expected
On Feb 20, 8:54 pm, MRAB wrote:
> vsoler wrote:
> > On Feb 20, 7:00 pm, MRAB wrote:
> >> vsoler wrote:
> >>> Hello everyone!
> >>> I have a tuple of tuples, coming from an Excel range, such as this:
> >>> ((None, u'x', u'y'),
> >>> (u'a', 1.0, 7.0),
> >>> (u'b', None, 8.0))
> >>> I need to build
vsoler wrote:
On Feb 20, 7:00 pm, MRAB wrote:
vsoler wrote:
Hello everyone!
I have a tuple of tuples, coming from an Excel range, such as this:
((None, u'x', u'y'),
(u'a', 1.0, 7.0),
(u'b', None, 8.0))
I need to build a dictionary that has, as key, the row and column
header.
For example:
d={ (
On Feb 20, 7:00 pm, MRAB wrote:
> vsoler wrote:
> > Hello everyone!
>
> > I have a tuple of tuples, coming from an Excel range, such as this:
>
> > ((None, u'x', u'y'),
> > (u'a', 1.0, 7.0),
> > (u'b', None, 8.0))
>
> > I need to build a dictionary that has, as key, the row and column
> > header.
vsoler wrote:
Hello everyone!
I have a tuple of tuples, coming from an Excel range, such as this:
((None, u'x', u'y'),
(u'a', 1.0, 7.0),
(u'b', None, 8.0))
I need to build a dictionary that has, as key, the row and column
header.
For example:
d={ (u'a',u'x'):1.0, (u'a',u'y'): 7.0, (u'b',u'y')
Hello everyone!
I have a tuple of tuples, coming from an Excel range, such as this:
((None, u'x', u'y'),
(u'a', 1.0, 7.0),
(u'b', None, 8.0))
I need to build a dictionary that has, as key, the row and column
header.
For example:
d={ (u'a',u'x'):1.0, (u'a',u'y'): 7.0, (u'b',u'y'):8.0 }
As you c
18 matches
Mail list logo