Cen*_*noc 6 hdf5 python-2.7 pandas hdfstore
我想知道是否有一种轻松,快速,无需加载整个文件的方法,获取hdf5文件中的行数,使用pandas创建,使用pandas?
先感谢您!
Jef*_*eff 18
In [1]: DataFrame(np.random.randn(10,10)).to_hdf('test.h5','df',mode='w',format='table')
In [3]: store = pd.HDFStore('test.h5')
In [4]: store
Out[4]:
<class 'pandas.io.pytables.HDFStore'>
File path: test.h5
/df frame_table (typ->appendable,nrows->10,ncols->10,indexers->[index])
In [5]: store.get_storer('df').nrows
Out[5]: 10
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1728 次 |
| 最近记录: |