Hi,
If I run this simple loop, I get the output I expect..
table = fp.root.table_0
for row in table:
print row
but when I call row.append(), the output changes and looks corrupted..
table = fp.root.table_0
for row in table:
print row
row.append()
Perhaps I am misunderstanding how row.append works. I want to iterate
over the data a row at a time, set some values in row and have those
values written back.
Here is the output when it's ok ( not calling append ) and then when I
do..
python tmp.py
(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0)
(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0)
(2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0)
(3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0)
(4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0)
(5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0)
(6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0)
(7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0)
(8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0)
(9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0)
python tmp.py
(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0)
(0.0, 0.0, 5.1949684891682224e-76, 3.2962254796880672e-260, 0.0,
1.28271820187416\
2e+45, -5.4060993840027115e-39, 0.0, 0.0, 0.0)
(0.0, 0.0, 0.0, 0.0, 2.6593181061630576e-293, -2.5144912217698657e-40,
0.0, 0.0, \
0.0, 0.0)
(0.0, 0.0, 0.0, -1.2835448071228927e-247, 1.149435495237775e-260, 0.0,
0.0, 0.0, \
1.4939062567974614e-309, 1.1862805280863329e-306)
(nan, 6.5191367783158677e+91, 1.6975966327722179e-313, 0.0,
1.8849466386307898e-2\
60, 0.0, 2.1219957904712067e-314, 1.9097962134497552e-313,
1.8849900568353108e-26\
0, 4.9406564584124654e-324)
(2.1219957904712067e-314, 1.9097962150307652e-313,
1.8850955010462896e-260, 0.0, \
2.1219957904712067e-314, 1.9097962166117753e-313,
1.8851389192508103e-260, 0.0, 2\
.1219957904712067e-314, 1.9097962181927854e-313)
(1.8852071478579149e-260, 4.2439915829186759e-314,
4.9406564584124654e-324, 1.909\
7962197737954e-313, 1.8853249972701853e-260, 0.0, 0.0, 0.0, 0.0, 0.0)
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
(0.0, 0.0, 0.0, 0.0, 0.0, 2.1219957909652723e-314,
7.644680467577401e-270, 0.0, 4\
.9406564584124654e-324, 0.0)
thanks!
Stefan
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
|