无法使用feather编写我的数据框(不支持跨步数据)

Pau*_* S. 8 python python-2.7 pandas feather

使用羽毛包时(http://blog.cloudera.com/blog/2016/03/feather-a-fast-on-disk-format-for-data-frames-for-r-and-python-powered-通过-apache-arrow /)尝试编写一个简单的20x20数据帧,我不断收到一条错误,指出尚未支持跨步数据.我不相信我的数据是跨步的(或不同寻常的),我可以复制网站上给出的示例代码,但似乎无法让它与我自己的工作.以下是一些示例代码:

import feather
import numpy as np
import pandas as pd

tempArr = reshape(np.arange(400), (20,20))
df = pd.DataFrame(tempArr)
feather.write_dataframe(df, 'test.feather')
Run Code Online (Sandbox Code Playgroud)

最后一行返回以下错误:

FeatherError: Invalid: no support for strided data yet
Run Code Online (Sandbox Code Playgroud)

我在Ubuntu 14.04上运行它.我是否可能误解了有关熊猫数据帧的存储方式?

Wes*_*ney 5

请来GitHub:https://github.com/wesm/feather/issues/97

错误报告不属于StackOverflow

  • 本质上,正如链接中所解释的那样,在将df写入羽状文件之前,可以通过执行`df = df.copy()`来解决问题. (4认同)