User 2788 | 12/16/2015, 6:57:34 AM
I want to achieve get_dummies function in dataframe using Graphlab Create and SFrame
Here is my original data set I want to create a sparse matrix based on the original data set, the result should be like this,
I tried the code below, ` Fruit=temp['Fruit'].unique() for i in range(len(Fruit)): temp[Fruit[i]]=0
def assignment(x): x[x['Fruit']]=1
But the corresponding cell is still 0.