简体   繁体   English

使用to_hdf将熊猫数据帧保存到磁盘时出现分段错误

[英]segmentation fault when saving pandas dataframe to disk with to_hdf

I am trying to save a dataframe to disk using hdf5 format. 我正在尝试使用hdf5格式将数据帧保存到磁盘。 Even this simple piece of code gives me "Segmentation fault (core dumped)" 即使这段简单的代码也给我“分段错误(核心已转储)”

import pandas as pd
import tables

df=pd.DataFrame([0,1,2,3],index=['a','b','c','d'])

df.to_hdf('test.h5','test',mode='w',format='table')

The problem seems to be the table-format. 问题似乎是表格格式。 In fixed-mode it runs fine. 在固定模式下,它运行良好。 I tried python 2.7.11+ and 3.5.1+ and am running pandas 0.18.1. 我尝试了python 2.7.11+和3.5.1+,并且正在运行pandas 0.18.1。 Any ideas what I am doing wrong? 有什么想法我做错了吗?

Use a newer version of PyTables. 使用较新版本的PyTables。 Version 3.2.3.1 does the job perfectly. 3.2.3.1版完美地完成了这项工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM