8

When using the feather package (http://blog.cloudera.com/blog/2016/03/feather-a-fast-on-disk-format-for-data-frames-for-r-and-python-powered-by-apache-arrow/) to try and write a simple 20x20 dataframe, I keep getting an error stating that strided data isn't yet supported. I don't believe my data is strided (or out of the ordinary), and I can replicate the sample code given on the website, but can't seem to get it to work with my own. Here is some sample code:

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')

The last line returns the following error:

FeatherError: Invalid: no support for strided data yet

I am running this on Ubuntu 14.04. Am I perhaps misunderstanding something about how pandas dataframes are stored?

ayhan
  • 70,170
  • 20
  • 182
  • 203
Paul S.
  • 83
  • 6
  • 1
    reshape generate a view, it can be a pb. try tempArr=tempArr.copy() before. – B. M. Apr 04 '16 at 16:21
  • 1
    @B.M. thanks for the suggestion! Just added that line right in between creating tempArr and creating the DataFrame, but still getting the same error. – Paul S. Apr 04 '16 at 16:41

1 Answers1

5

Please come to GitHub: https://github.com/wesm/feather/issues/97

Bug reports do not belong on StackOverflow

user189035
  • 5,589
  • 13
  • 52
  • 112
Wes McKinney
  • 101,437
  • 32
  • 142
  • 108
  • 4
    In essence, as explained in the link, the issue can be solved by doing `df = df.copy()` before writing df to a feather file. – user189035 Oct 14 '16 at 11:50