title: Convert data from many rows to many columns
body: <p>I have data that comes out of a DB in a normalized way with a field for year, state, and value.</p>
  
  <p>I would like to do analysis on the data and need it formatted where each year is a field and not a record.So I would like the data where each record is a state and then there's a field for each year and each value for those fields are the value for that year and that state.</p>
  
  <p>Is there a command for doing this?</p>
  
  <p>So I have:</p>
  
  <pre><code>State  Year  Value  
     KY  1998     56  
     KY  1997     78  
     IL  1998     48  
     IL  1997     72
  </code></pre>
  
  <p>and I want:</p>
  
  <pre><code>State  1997_value  1998_value  
     KY          78          56  
     IL          72          48
  </code></pre>