Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API/ENH: query an HDF5 store with a named index #9042

Open
jreback opened this issue Dec 8, 2014 · 5 comments
Open

API/ENH: query an HDF5 store with a named index #9042

jreback opened this issue Dec 8, 2014 · 5 comments
Labels
Enhancement IO HDF5 read_hdf, HDFStore

Comments

@jreback
Copy link
Contributor

jreback commented Dec 8, 2014

from SO

In [1]: df = pd.DataFrame.from_dict({'A':[1,2],'B':[100,200], 'C':[42,11]})
In [2]: df_a = df.set_index('A')
In [3]: df_a
Out[3]: 
     B   C
A         
1  100  42
2  200  11

In [4]: store = pd.HDFStore('foo.h5','w')
In [5]: store.put('bar', df_a, format='table', data_columns=True)
In [7]: store.select('bar','index==1')
store.select('bar','A==1)

should work as well (obviously only for a named index)

@jreback jreback added this to the 0.16.0 milestone Dec 8, 2014
@jreback jreback changed the title BUG: query an HDF5 store with a named index API/ENH: query an HDF5 store with a named index Dec 8, 2014
@jreback jreback added Enhancement and removed Bug labels Dec 8, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@pgryko
Copy link

pgryko commented Aug 30, 2015

Am looking into this now

@pgryko
Copy link

pgryko commented Aug 30, 2015

Seems that the pandas.io.pytables.AppendableFrameTable doesn't store A as the alias for index. Not sure how to fix this

@jreback
Copy link
Contributor Author

jreback commented Aug 30, 2015

the index names are stored on an attribute on the node

@Madhu94
Copy link

Madhu94 commented Jun 29, 2017

@jreback Is this still an issue ?

@jreback
Copy link
Contributor Author

jreback commented Jun 30, 2017

yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement IO HDF5 read_hdf, HDFStore
Projects
None yet
Development

No branches or pull requests

6 participants