title: how to get the average of dataframe column values
body: <pre><code>                    A        B
  DATE                 
  2013-05-01        473077    71333
  2013-05-02         35131    62441
  2013-05-03           727    27381
  2013-05-04           481     1206
  2013-05-05           226     1733
  2013-05-06           NaN     4064
  2013-05-07           NaN    41151
  2013-05-08           NaN     8144
  2013-05-09           NaN       23
  2013-05-10           NaN       10
  </code></pre>
  
  <p>say i have the dataframe above.  what is the easiest way to get a series with the same index which is the average of the columns A and B?  the average needs to ignore NaN values. the twist is that this solution needs to be flexible to the addition of new columns to the dataframe.</p>
  
  <p>the closest i have come was </p>
  
  <pre><code>df.sum(axis=1) / len(df.columns)
  </code></pre>
  
  <p>however, this does not seem to ignore the NaN values</p>
  
  <p>(note:  i am still a bit new to the pandas library, so i'm guessing there's an obvious way to do this that my limited brain is simply not seeing)</p>