3

mydata我有一个带有DataFrame ( )的 pandas HDFStore 对象(如果相关,pandas 使用 PyTables 来实现 HDF5 ),store["mydata"] = mydata并且有一些代码可以定期将数据附加到mydataDataFrame。当我尝试访问该 HDFStore 时,出现此错误。

//anaconda/lib/python2.7/site-packages/tables/group.py:1213: UserWarning: problems loading leaf ``/mydata/table``::

  HDF5 error back trace

  File "H5Dio.c", line 173, in H5Dread
    can't read data
  File "H5Dio.c", line 551, in H5D__read
    can't read data
  File "H5Dchunk.c", line 1872, in H5D__chunk_read
    unable to read raw data chunk
  File "H5Dchunk.c", line 2902, in H5D__chunk_lock
    data pipeline read failed
  File "H5Z.c", line 1375, in H5Z_pipeline
    filter returned failure during read
  File "H5Zdeflate.c", line 125, in H5Z_filter_deflate
    inflate() failed

End of HDF5 error back trace

Problems reading the array data.

The leaf will become an ``UnImplemented`` node.
  % (self._g_join(childname), exc))

这是我打印时商店的样子。

<class 'pandas.io.pytables.HDFStore'>
File path: ../path/to/panda/store.h5
/mydata               [invalid_HDFStore node: 'UnImplemented' object has no attribute 'description']

我不确定为什么会这样。

为了处理数据,我.h5从另一个位置复制并粘贴了文件(如果重要,则无需调用.close())。这可能是错误的根源还是因为我正在附加数据format=table

4

0 回答 0