title: How can I transform rows into repeated column based data?
body: <p>I'm trying to take a dataset that looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/Uh0d6.jpg" alt="Source format of data"></p>
  
  <p>And transform the records into this format:</p>
  
  <p><img src="https://i.stack.imgur.com/CjVT4.jpg" alt="Destination Format"></p>
  
  <p>The resulting format would have two columns, one for the old column names and one column for the values. If there are 10,000 rows then there should be 10,000 groups of data in the new format. </p>
  
  <p>I'm open to all different methods, excel formulas, sql (mysql), or straight ruby code would work for me also. What is the best way to tackle this problem?</p>