What is the most effective way to add a lot of columns with same elements' values to SFrame?
User 5238 | 5/26/2016, 2:20:48 PM
hi, I am trying to add a large number of columns; between 1 and 1000 columns with the same values,i.e. all elements are zeros, to an SFrame
what is the most effective and fastest way to do this?
User 5159 | 5/26/2016, 8:28:15 PM
I think more than 1000 columns may hurt performance of SFrmae. Could you consider to use array type inside of SFrame?
User 5238 | 5/26/2016, 9:11:03 PM
thank you, I will look at it, I didn't know that I can use an array type
User 2568 | 6/6/2016, 4:33:26 AM
@eyad_alshami, I curious why you would add 1000 columns with all zeros.
BTW, if your data is sparse, then considering using a column of dictionaries. The key in the dictionary represents the column and the value in the diction the value in the column. Only items that are not zero (or some constant) in a row have an entry in the dict.