I've created a table with 10 rows and 3 columns, each column contains
integer values.
I would like to modify the value contained in the third column of the
second row from the original value of 4 to 5 but couldn't find a quick
way to do it inside the pytables manual.
In first stance i tried to:
mytable[1][2] = 5
mytable.flush()
but in this way the new value is not written into the table (even if no
errors were reported).
I only succeeded the task by iterating throughout all the rows searching
for the desidered one:
for row in self.table:
if row.nrow == index.row():
row[index.column()] = cell_value
row.update()
self.table.flush()
anyway this second approach is not efficient, because in order to look
for a cell of known coordinates, the for..in loop iterates all the
previous rows.
What is the most efficient way to perform this simple task?
Thanks.
Luca Della Santina
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users