From: Francesc A. <fa...@ca...> - 2005-06-23 16:05:31
|
A Tuesday 21 June 2005 20:51, dragan savic va escriure: > Is it possible to add fields to already created table > and if it is, how can I do that? Well, no and yes. No because there is not a high level method to do that. Yes because you can do this manipulating somewhat the objects. Look at the attachment, were I wrote a simple example of doing that. The output looks like: $ python add-column.py Contents of the original table: NestedRecArray[ ('Particle: 10', 10, 0, 100.0, 100.0), ('Particle: 11', 11, -1, 121.0, 121.0), ('Particle: 12', 12, -2, 144.0, 144.0) ] Contents of the table with column added: NestedRecArray[ ('Particle: 10', 10, 0, 100.0, 100.0, 0), ('Particle: 11', 11, -1, 121.0, 121.0, 0), ('Particle: 12', 12, -2, 144.0, 144.0, 1) ] In the future, it would be interesting to create a high level method to easy such operation. Cheers, =2D-=20 >0,0< Francesc Altet =A0 =A0 http://www.carabos.com/ V V C=E1rabos Coop. V. =A0=A0Enjoy Data "-" |