title: How to split data by delimiter for corresponding name and value columns
body: <p>I'm trying to use an excel file to do something which was put together in a rather annoying format (I did not create it; it's an existing resource I'm using). The values of interest are in a column called (something like) <code>All_Values</code> separated by periods, while the measures corresponding to those values are specified in a separate column, <code>All_Measures</code>, also separated by periods and different for each row. For example, using a toy dataset:</p>
  <pre><code>Object        All_Measures  All_Values     (additional columns that are not like this)
       1       Height.Weight      20.50      ...
       2       Weight.Height      65.30      ...
       3  Height.Width.Depth   22.30.10      ...
  </code></pre>
  <p>What I want to do is reformat the data like this, filling in the missing values with 0s (the final order of the columns isn't important):</p>
  <pre><code>Object  Height  Weight  Width  Depth  (additional columns)
       1      20      50      0      0  ...
       2      30      65      0      0  ...
       3      22       0     30     10  ...
  </code></pre>
  <p>One way I can do this is to (very slowly, as it's a large dataset) create a new blank dataframe, and then iterate over each row in the existing one, create a new dataframe row with the columns specified by splitting <code>All_Measures</code> by <code>.</code>, and the values specified by splitting <code>All_Values</code> by <code>.</code>. Then, I remove <code>All_Measures</code> and <code>All_Values</code> from the row and append the new dataframe to the end of it, and append that to the blank dataframe. But this is pretty clumsy and it'd be nice if there were a faster and more elegant way to do it.</p>
  <p>Since there's no error here, I don't have a MWE, but here's some code one could copy to create a toy dataset like the above in case it comes in handy.</p>
  <pre><code>df = pd.DataFrame(
      columns = ['Object','All_Measures','All_Values','Object_Name']
      [[1,'Height.Weight','20.50','First'], 
       [2,'Weight.Height','65.30','Second'], 
       [3,'Height.Width.Depth','22.30.10','Third']]
  )
  </code></pre>