Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
TypeError when reading a Series with read_hdf(mode='r') from fixed format #16583
Code Sample, a copy-pastable example if possible
import tempfile import pandas as pd series = pd.Series([1, 2, 3]) with tempfile.NamedTemporaryFile() as tf: series.to_hdf(tf.name, 'data', format='fixed') result = pd.read_hdf(tf.name, key='data', mode='r') assert (result == series).all()
For some inexplicable reason,
no, that is read-only. (though you can open the file yourself in append mode if you wanted)
The difference of course is that PyTables acts more like a database, where you generally both read and write, while a file you generally don't.