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
ERR: raise on invalid coulmns using a fixed HDFStore #13492
not really sure what you are doing.
pls show an exact reproduction.
I am using the HDFStore interface. With your code snippet, please try and reset_index() on the returned frame, when the format="fixed"
Jun 20, 2016
The index name is string in the source data frame. Storing it to hdf5 and retrieving it back is when the type changes to numpy.string_.
I have not done a pull request before. This would be my first. Will give it a shot.
Hi! I'm at the sprints at pycon and am looking to pick this up! Managed to reproduce the issue even though for the type I get:
In : type(s1.index.name) Out: numpy.str_
Same issue arises when reading the table with
In terms of expected behavior, I'm not entirely certain what we want here - should we be casting the
Single-file example for easy reproduction:
import pandas as pd import numpy as np import datetime idx = pd.Index(pd.to_datetime([datetime.date(2000, 1, 1), datetime.date(2000, 1, 2)]), name='cols') idx1 = pd.Index(pd.to_datetime([datetime.date(2010, 1, 1), datetime.date(2010, 1, 2)]), name='rows') s = pd.DataFrame(np.arange(4).reshape(2,2), columns=idx, index=idx1) with pd.HDFStore("test.h5", "w") as store: store.put("test", s, "fixed") with pd.HDFStore("test.h5", "r") as store: s1 = store["test"] # s1.reset_index()