title: understanding math errors in pandas dataframes
body: <p>I'm trying to generate a new column in a pandas dataframe from other columns and am getting some math errors that I don't understand.  Here is a snapshot of the problem and some simplifying diagnostics...</p>
  
  <p>I can generate a data frame that looks pretty good:</p>
  
  <pre><code>import pandas
  import math as m
  
  data = {'loc':['1','2','3','4','5'],
          'lat':[61.3850,32.7990,34.9513,14.2417,33.7712],
          'lng':[-152.2683,-86.8073,-92.3809,-170.7197,-111.3877]}
  frame = pandas.DataFrame(data)
  
  frame
  
  Out[15]:
  lat lng loc
  0    61.3850    -152.2683    1
  1    32.7990     -86.8073    2
  2    34.9513     -92.3809    3
  3    14.2417    -170.7197    4
  4    33.7712    -111.3877    5
  5 rows × 3 columns
  </code></pre>
  
  <p>I can do simple math (i.e. degrees to radians):</p>
  
  <pre><code>In [32]:
  m.pi*frame.lat/180.
  
  Out[32]:
  0    1.071370
  1    0.572451
  2    0.610015
  3    0.248565
  4    0.589419
  Name: lat, dtype: float64
  </code></pre>
  
  <p>But I can't convert from degrees to radians using the python math library:</p>
  
  <pre><code> In [33]:
   m.radians(frame.lat)
  
  ---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-33-99a986252f80&gt; in &lt;module&gt;()
  ----&gt; 1 m.radians(frame.lat)
  
  /Users/user/anaconda/lib/python2.7/site-packages/pandas/core/series.pyc in wrapper(self)
       72             return converter(self.iloc[0])
       73         raise TypeError(
  ---&gt; 74             "cannot convert the series to {0}".format(str(converter)))
       75     return wrapper
       76 
  
  TypeError: cannot convert the series to &lt;type 'float'&gt;
  </code></pre>
  
  <p>And can't even convert the values to floats to try to force it to work:</p>
  
  <pre><code>In [34]:
  
  float(frame.lat)
  ---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-34-3311aee92f31&gt; in &lt;module&gt;()
  ----&gt; 1 float(frame.lat)
  
  /Users/user/anaconda/lib/python2.7/site-packages/pandas/core/series.pyc in wrapper(self)
       72             return converter(self.iloc[0])
       73         raise TypeError(
  ---&gt; 74             "cannot convert the series to {0}".format(str(converter)))
       75     return wrapper
       76 
  
  TypeError: cannot convert the series to &lt;type 'float'&gt;
  </code></pre>
  
  <p>I'm sure there must be a simple explanation and would appreciate your help in finding it.  Thanks!</p>