私はパンダでのデータフレームがあります。私は、ディスクにこれを保存しようとすると(「オブジェクトヘッダメッセージが大きすぎる」)
In [7]: my_df
Out[7]:
<class 'pandas.core.frame.DataFrame'>
Int64Index: 34 entries, 0 to 0
Columns: 2661 entries, airplane to zoo
dtypes: float64(2659), object(2)
を:
store = pd.HDFStore(p_full_h5)
store.append('my_df', my_df)
私は取得:
File "H5A.c", line 254, in H5Acreate2
unable to create attribute
File "H5A.c", line 503, in H5A_create
unable to create attribute in object header
File "H5Oattribute.c", line 347, in H5O_attr_create
unable to create new attribute in header
File "H5Omessage.c", line 224, in H5O_msg_append_real
unable to create new message
File "H5Omessage.c", line 1945, in H5O_msg_alloc
unable to allocate space for message
File "H5Oalloc.c", line 1142, in H5O_alloc
object header message is too large
End of HDF5 error back trace
Can't set attribute 'non_index_axes' in node:
/my_df(Group) u''.
なぜですか?
注:
In[12]: max([len(x) for x in list(my_df.columns)])
Out{12]: 47
これは、すべてのパンダ0.11とIPython、PythonとHDF5の最新の安定版である:それは重要場合は、データフレームの列名は、単純な小さな文字列です。
問題はあなたのインデックスです。彼らはすべて0ですか?それは本当に奇妙です。あなたのフレームのサンプルを表示できますか? – Jeff
一般に、列よりも多くの行が必要です。 hdf5は行ベースです。あなたのフレームの転置を保存してみてください – Jeff