!RE: Namedtuple problem #32.11.d

2017-06-07 Thread Deborah Swanson
Neil Cerutti wrote, on Wednesday, June 07, 2017 10:36 AM > > On 2017-06-06, Deborah Swanson wrote: > >> I too have sometimes started with a namedtuple and then found I > >> needed to make changes to the records. I typically abandon > namedtuple > >> at this point,

Re: Namedtuple problem #32.11.d

2017-06-07 Thread Neil Cerutti
On 2017-06-06, Deborah Swanson wrote: >> I too have sometimes started with a namedtuple and then found >> I needed to make changes to the records. I typically abandon >> namedtuple at this point, after only one bad experience trying >> to work around my choice of

RE: Namedtuple problem #32.11.d

2017-06-06 Thread Deborah Swanson
Richard Moseley wrote, on Tuesday, June 06, 2017 8:16 AM > > On 06/06/17 13:29, Neil Cerutti wrote: > > On 2017-06-06, Deborah Swanson wrote: > >> I have a list of namedtuples: > >> > >>[{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='') > >>. . . > >>

RE: Namedtuple problem #32.11.d

2017-06-06 Thread Deborah Swanson
Neil Cerutti wrote, on Tuesday, June 06, 2017 5:29 AM > > On 2017-06-06, Deborah Swanson wrote: > > I have a list of namedtuples: > > > > [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='') > > . . . > > {Record}(r0=v0,

RE: Namedtuple problem #32.11.d

2017-06-06 Thread Deborah Swanson
Peter Otten wrote, on Tuesday, June 06, 2017 1:31 AM > > Deborah Swanson wrote: > > > [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='') > > Lovely column names ;) Not very sexy names, I agree ;) The columns do have real names. The first 10 are friendly and semi-friendly names, but the

Re: Namedtuple problem #32.11.d

2017-06-06 Thread Richard Moseley
On 06/06/17 13:29, Neil Cerutti wrote: On 2017-06-06, Deborah Swanson wrote: I have a list of namedtuples: [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='') . . . {Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')] In the first

Re: Namedtuple problem #32.11.d

2017-06-06 Thread Neil Cerutti
On 2017-06-06, Deborah Swanson wrote: > I have a list of namedtuples: > > [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='') > . . . > {Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')] > > In the first section of code, I process some of

Re: Namedtuple problem #32.11.d

2017-06-06 Thread Peter Otten
Deborah Swanson wrote: > [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='') Lovely column names ;) > Because, I can't say > > r = r._replace(getattr(r, column) = data) When r is mutable, i. e. *not* a namedtuple, you can write setattr(r, column, data) This assumes column is the column

Namedtuple problem #32.11.d

2017-06-05 Thread Deborah Swanson
I have a list of namedtuples: [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='') . . . {Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')] In the first section of code, I process some of the first 10 columns (r0=v0, r1=v1,...,r10=v10), and place the results in