Shan
2016-07-19 16:07:22 UTC
I apologise as this is a beginner's question:
I have the following pandas dataframe:
import pandas as pd
df = pd.read_table(fname.dat)
So, I create/ open an existing HDFStore file:
store = pd.HDFStore('store.h5')
To index a subset of columns, I simply use
store.append('key_name', df, data_columns=['colA','colB','colZ'])
Apparently, `HDFStore.append() `saves pandas dataframes per default in
`table` format. However, it looks like it is actually a 'frame_table'
object:
store
outputs
/key_name frame_table
(typ->appendable,nrows->3254334,ncols->14,indexers->[index],dc->[colA,
colB, colZ]) How do I efficiently index this object? Normally, the query
would be result = [row for row in table.where('colA==22 & colB==45')] But
would does one do this for a `frame_table` object?
I have the following pandas dataframe:
import pandas as pd
df = pd.read_table(fname.dat)
So, I create/ open an existing HDFStore file:
store = pd.HDFStore('store.h5')
To index a subset of columns, I simply use
store.append('key_name', df, data_columns=['colA','colB','colZ'])
Apparently, `HDFStore.append() `saves pandas dataframes per default in
`table` format. However, it looks like it is actually a 'frame_table'
object:
store
outputs
/key_name frame_table
(typ->appendable,nrows->3254334,ncols->14,indexers->[index],dc->[colA,
colB, colZ]) How do I efficiently index this object? Normally, the query
would be result = [row for row in table.where('colA==22 & colB==45')] But
would does one do this for a `frame_table` object?
--
You received this message because you are subscribed to the Google Groups "pytables-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytables-users+***@googlegroups.com.
To post to this group, send an email to pytables-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "pytables-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytables-users+***@googlegroups.com.
To post to this group, send an email to pytables-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.