title: Split list in a column to multiple columns
body: <p>I have two DataFrames as below:</p>
  <p><strong>df1.shape = (4,2)</strong></p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Text</th>
  <th>Topic</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Where is the party tonight?</td>
  <td>Party</td>
  </tr>
  <tr>
  <td>Let's dance</td>
  <td>Party</td>
  </tr>
  <tr>
  <td>Hello world</td>
  <td>Other</td>
  </tr>
  <tr>
  <td>It is rainy today</td>
  <td>Weather</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p><strong>df2.shape(4,2)</strong></p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>0</th>
  <th>1</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Where is the party tonight?</td>
  <td>[-0.011570500209927559, -0.010117080062627792,….,0.062448356]</td>
  </tr>
  <tr>
  <td>Let's dance</td>
  <td>[-0.08268199861049652, -0.0016140303341671824,….,0.02094201]</td>
  </tr>
  <tr>
  <td>Hello world</td>
  <td>[-0.0637684240937233, -0.01590338535606861,….,0.02094201]</td>
  </tr>
  <tr>
  <td>It is rainy today</td>
  <td>[0.06379614025354385, -0.02878064103424549,….,0.056790903]</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Basically <code>df2</code> is the embedding of each sentence on the <code>df1</code> which has a topic associated to it. The embedding is in 'column 1' in <code>df2</code> which has a string of list of positive or negative integers of size 512.</p>
  <p>My desired output DataFrame is:</p>
  <p><strong>df_output.shape = (4,514)</strong></p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Text</th>
  <th>Topic</th>
  <th>Feature_0</th>
  <th>Feature_2</th>
  <th>….</th>
  <th>Feature_511</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Where is the party tonight?</td>
  <td>Party</td>
  <td>-0.0115705</td>
  <td>-0.01011708</td>
  <td>….</td>
  <td>0.0624484</td>
  </tr>
  <tr>
  <td>Let's dance</td>
  <td>Party</td>
  <td>-0.082681999</td>
  <td>-0.00161403</td>
  <td>….</td>
  <td>0.020942</td>
  </tr>
  <tr>
  <td>Hello world</td>
  <td>Other</td>
  <td>-0.063768424</td>
  <td> -0.01590338535606861,</td>
  <td>….</td>
  <td>0.020942</td>
  </tr>
  <tr>
  <td>It is rainy today</td>
  <td>Weather</td>
  <td>0.06379614</td>
  <td>-0.028780641</td>
  <td>….</td>
  <td>0.056790903</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>How can I get this done. I was trying to split the embeddings in the DataFrame <code>df2</code> into columns but it doesn't work for me. This is what I have done so far:</p>
  <pre><code>df2.join(pd.DataFrame(df2[&quot;1&quot;].values.tolist()).add_prefix('feature_'))
  </code></pre>
  <p>It just created a duplicate column 1 as <code>feature_0</code>. I haven't even reached to the stage where I can work to join <code>df1</code> and <code>df2</code>.</p>