title: Polar transformation of pandas DataFrame
body: <p>I have a <code>pandas.DataFrame</code> 2048 by 2048 with <code>index</code> and <code>columns</code> representing y and x coordinates respectively.</p>
  
  <p>I want to make an axis transformation and get to polar coordinates, making a new <code>pandas.DataFrame</code> with <code>index</code> and <code>columns</code> representing radius and polar angle.
  The only way I can think of is access the dataframe values one by one, calculating radius and angle and then setting the according value in the new dataframe, but it is extremely slow, since element-wise operations are not that fast in pandas. It's still slow even if I perform the operation row-by-row.</p>
  
  <p>Is there a better way to do that without writing my own CPython extension in C?</p>