title: Pandas: Creating new data frame from only certain columns
body: <p>I have a csv file with measurements, and I want to create a new csv file with the hourly averages and standard deviations. But only for certain columns.</p>
  
  <p>Example:</p>
  
  <p>csv1:</p>
  
  <pre><code>YY-MO-DD HH-MI-SS_SSS    |     Acceleration  |        Lumx     |    Pressure
  2015-12-07 20:51:06:608  |        22.7       |        32.3     |     10
  2015-12-07 20:51:07:609  |        22.5       |        47.7     |     15
  </code></pre>
  
  <p>to csv 2 (only for the pressure and acceleration:</p>
  
  <pre><code> YY-MO-DD HH-MI-SS_SSS       | Acceleration avg  |   Pressure avg
      2015-12-07 20:00:00:000  |        22.6       |        12.5     
      2015-12-07 21:00:00:000  |        ....       |        ....    
  </code></pre>
  
  <p>Now I have an idea (thanks to the people on this site) on how to calculate the averages - but i'm having trouble on creating a new smaller dataframe that contains the calculations for a few columns.</p>
  
  <p>Thanks !!!</p>