title: Apply sign function to a column that contains NaN values
body: <p>I have a column that contains both valid numbers as well as NaN. I want to apply sign function on its values and keep the result in a new column.</p>
  <p>When I use <code>np.sign</code> as follows, it fails saying: <code>{TypeError} unorderable types for comparison</code>.</p>
  <pre><code>df['new_column'] = np.sign(df['column'])
  </code></pre>
  <p>Note that I cannot replace <code>NaN</code> with 0 or something beforehand. In my case if it is a NaN, its sign should be NaN as well.</p>