无法从HDF数据存储加载

时间:2015-04-06 09:53:02

标签: python pandas hdfs

我在Windows 64 Bit上使用pandas 0.11.0。

我有一个数据存储区:

store = pandas.io.pytables.HDFStore( r"""C:\data.h5""" )

里面有一些数据:

print(store)
<class 'pandas.io.pytables.HDFStore'>
File path: C:\data.h5

/region                           frame        (shape->[30,2])     
/sector                           frame        (shape->[116,2])  

当我尝试从商店加载'sector'时,我得到:

store['/sector']
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-24-7fea069742ed> in <module>()
----> 1 store['/sector']

C:\Anaconda\lib\site-packages\pandas\io\pytables.pyc in __getitem__(self, key)
    236 
    237     def __getitem__(self, key):
--> 238         return self.get(key)
    239 
    240     def __setitem__(self, key, value):

C:\Anaconda\lib\site-packages\pandas\io\pytables.pyc in get(self, key)
    369         if group is None:
    370             raise KeyError('No object named %s in the file' % key)
--> 371         return self._read_group(group)
    372 
    373     def select(self, key, where=None, start=None, stop=None, columns=None, iterator=False, chunksize=None, **kwargs):

C:\Anaconda\lib\site-packages\pandas\io\pytables.pyc in _read_group(self, group, **kwargs)
    876         s = self._create_storer(group)
    877         s.infer_axes()
--> 878         return s.read(**kwargs)
    879 
    880 class TableIterator(object):

C:\Anaconda\lib\site-packages\pandas\io\pytables.pyc in read(self, **kwargs)
   1982         blocks = []
   1983         for i in range(self.nblocks):
-> 1984             blk_items = self.read_index('block%d_items' % i)
   1985             values = self.read_array('block%d_values' % i)
   1986             blk = make_block(values, blk_items, items)

C:\Anaconda\lib\site-packages\pandas\io\pytables.pyc in read_index(self, key)
   1615             return self.read_sparse_intindex(key)
   1616         elif variety == 'regular':
-> 1617             _, index = self.read_index_node(getattr(self.group, key))
   1618             return index
   1619         else:  # pragma: no cover

C:\Anaconda\lib\site-packages\pandas\io\pytables.pyc in read_index_node(self, node)
   1733                             **kwargs)
   1734         else:
-> 1735             index = factory(_unconvert_index(data, kind), **kwargs)
   1736 
   1737         index.name = name

TypeError: __new__() got an unexpected keyword argument 'freq'

这个“频率”论点是什么?为什么它阻止我加载数据?

0 个答案:

没有答案