title: How do I split out a column but keep the key for each entry?
body: <p>I have a dataframe that looks like this:</p>
  <pre><code>df = pd.DataFrame({&quot;ID&quot;: [&quot;P-1&quot;, &quot;P-2&quot;, &quot;P-3&quot;], &quot;Acc No&quot;: ['11234/57468/28576', '13245/13246', '46578/37264/35264'], &quot;Company&quot;: [&quot;red&quot;, &quot;yellow&quot;, &quot;blue&quot;]})
  
  print(df)
  </code></pre>
  <p>I would like to split out the 'Acc No' column so that each entry keeps the data from the remaining columns e.g.</p>
  <pre><code>df2 = pd.DataFrame({&quot;ID&quot;: [&quot;P-1&quot;,&quot;P-1&quot;,&quot;P-1&quot;, &quot;P-2&quot;,&quot;P-2&quot;, &quot;P-3&quot;,&quot;P-3&quot;,&quot;P-3&quot;], &quot;Acc No&quot;: ['11234','57468','28576', '13245','13246', '46578','37264','35264'], &quot;Company&quot;: [&quot;red&quot;, &quot;red&quot;,&quot;red&quot;,&quot;yellow&quot;, &quot;yellow&quot;, &quot;blue&quot;, &quot;blue&quot;, &quot;blue&quot;]})
  
  print(df2)
  </code></pre>
  <p>I've tried splitting out the Acc No. column, which works but I can't find the correct way to match the new columns to the existing data.</p>
  <p>How can I do this?</p>