graphlab adding variable columns from existing sframe
<p>I have a SFrame e.g.</p>

<pre><code>a | b
-----
2 | 31 4 5
0 | 1 9
1 | 2 84
</code></pre>

<p>now i want to get following result</p>

<pre><code>a | b      | c | d | e
----------------------
2 | 31 4 5 | 31|4  | 5
0 | 1 9    | 1 | 9 | 0
1 | 2 84   | 2 | 84 | 0
</code></pre>

<p>any idea how to do it?  or maybe i have to use some other tools? </p>

<p>thanks</p>

<p>This can be done by SFrame itself not using Pandas. Just utilize '<strong><a href="https://turi.com/products/create/docs/generated/graphlab.SFrame.unpack.html?highlight=unpack#graphlab.SFrame.unpack" rel="nofollow">unpack</a></strong>' function. </p>

<p>Pandas provides a variety of functions to handle dataset, but it is inconvenient to convert SFrame to Pandas DataFrame and vice versa. </p>

<p>If you handles over 10 Giga bytes data, Pandas can not properly handle the dataset. (But SFrame can)  </p>

<pre><code># your SFrame
sf=sframe.SFrame({'a' : [2,0,1], 'b' : [[31,4,5],[1,9,],[2,84,]]})

# just use 'unpack()' function
sf2= sf.unpack('b')

# change the column names
sf2.rename({'b.0':'c', 'b.1':'d', 'b.2':'e'})

# filling-up the missing values to zero
sf2 = sf2['e'].fillna(0)

# merge the original SFrame and new SFrame
sf.join(sf2, 'a')
</code></pre>

python pandas graphlab