I am playing around with PyTables, and stumbled into something I thought would be obvious. I am following the tutorial, but I guess I misunderstand.
I have a PyTables Column object and I want to transfer it's contents to list or numpy array.
So I was hoping there would be something like:
mylist = h5file.root.mygroup.mytable.cols.mycolumn.to_array()
I suppose I could iterate, and put each value separately in the list, but I am wondering if I could somehow extract it directly.
Thanks!
Try this:
mylist = h5file.root.mygroup.mytable.cols.mycolumn[:]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With