title: Split different entries into separate rows allowing only certain combinations
body: <p>I have searched along the web for an answer, but, while similar questions have been asked, they were not the same and I have not been able use them.</p>
  
  <p>I have a pandas dataframe in which several columns of text strings contains, sometimes, comma-separated values. I want to split each CSV field which contains these comma-separated values of three of them, creating a new row per entry, but in parallel, in this way (with A, C and D, not using E):</p>
  
  <pre><code>In [10]: before 
  Out[10]: 
      A        B    C            D         E
  0  a1,a2,a3  1    c1, c2, c3   d1,d2,d3  e1,e2,e3
  1  a4        2    c4           d4        e4
  
  In [11]: after
  Out[11]: 
        A    B     C    D     E
  0    a1    1    c1   d1    e1,e2,e3
  1    a2    1    c2   d2    e1,e2,e3
  2    a3    1    c3   d3    e1,e2,e3
  3    a4    2    c4   d4    e4
  </code></pre>
  
  <p>The problem is, it should work for different tables, and all of these tables may have different columns (but always these three, A, C and D, in common, with the same names). And, plus, the other columns may have comma-separated values in some cells that have not be splitted, as it happened with E.</p>
  
  <p>EDIT: These three columns will always have the same number of comma separated values in the same row, but it can vary between rows (1 value, 2 comma-separated values, 3 comma-separated values...).</p>
  
  <p>I am sorry, I would like to offer some code, but I have not been able to make anything remotely useful.</p>
  
  <p>Can someone help me? I would really appreciate any help! :)</p>