How to convert a 2d Numpy array to SFrame?

User 5238 | 6/1/2016, 3:59:07 PM

I have a 2d Numpy array, and I want to construct an SFrame from it. My approach was to pass the Numpy array to the SFrame constructor and then use: SFrame.unpack("X1", columnnameprefix = "") Is this the ideal way? is there a more efficient way to do this?

Comments

User 2014 | 6/1/2016, 9:18:17 PM

That sounds right. Once the columns are unpacked, the SFrame should behave as expected.

Most of our algorithms can deal with the data in packed format, so depending on what you want to do, you may not need to unpack it; although it would make your life easier down the road to have it unpacked. So, what you are doing is fine :)