I have an HDF5 file and want to periodically check its shape with Apscheduler.
>>> file = tb.open_file('data.h5', 'r')
>>> print( file.root.group01.table01[:].shape )
(76858,)
The problem is that the table's shape is not updated even after new data is added to the table. Therefore, it's always (76858,), which is loaded for the first time, even after I delete the file object(del file
) and open it again.
I remember reading that Python keeps some values so that it can use the values later again without the same repetitive procedures. Is it the same case? How can I make it reload the file and show updated table information?