Serving the Quantitative Finance Community

 
User avatar
strimp099
Topic Author
Posts: 0
Joined: November 24th, 2007, 6:51 pm

Pandas and PyTables

May 12th, 2011, 9:14 pm

The io module (pandas.io) has a pytables.py file (https://github.com/wesm/pandas/blob/mas ... ytables.py) which contains a HDFStore method. The comments in the code layout a simple (four line) example: >>> store = HDFStore('test.h5') >>> store['foo'] = bar # write to HDF5 >>> bar = store['foo'] # retrieve >>> store.close()The 'bar' variable is a pandas DataMatrix object. Basically, create a file 'test.h5' through pytables and then create an empty group, 'foo'. When you set 'bar' to 'foo', the root node of test.h5 has a group 'foo' populated with three tables. One with the column names, one with the indices, and one with the values.Is anyone aware of a good tutorial, list of examples, or guide on using pandas with PyTables in a practice? Anyone with experience implementing the combination?http://code.google.com/p/pandas/http:// ... s.org/moin