title: Diff on pandas dataframe with more than one column
body: <p>I have a pandas dataframe with two columns:</p>
  
  <pre><code>ddf.head()
  
      a    b
  0   3136 13280
  1   3072 13312
  2   3152 13296
  3   3120 13248
  4   3120 13200
  </code></pre>
  
  <p>I would like to calculate the difference between consecutive elements in the same column. Now, if I do it for one column at a time (<code>ddf['a'].diff()</code>) it works as I expect, but if I try <code>ddf.diff()</code> it gives:</p>
  
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-68-6ff864856571&gt; in &lt;module&gt;()
  ----&gt; 1 ddf.diff()
  
  /home/app/anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc in diff(self, periods)
     4285         diffed : DataFrame
     4286         """
  -&gt; 4287         new_data = self._data.diff(periods)
     4288         return self._constructor(new_data)
     4289 
  
  /home/app/anaconda/lib/python2.7/site-packages/pandas/core/internals.pyc in diff(self, *args, **kwargs)
     1287 
     1288     def diff(self, *args, **kwargs):
  -&gt; 1289         return self.apply('diff', *args, **kwargs)
     1290 
     1291     def interpolate(self, *args, **kwargs):
  
  /home/app/anaconda/lib/python2.7/site-packages/pandas/core/internals.pyc in apply(self, f, *args, **kwargs)
     1267                 applied = f(blk, *args, **kwargs)
     1268             else:
  -&gt; 1269                 applied = getattr(blk,f)(*args, **kwargs)
     1270 
     1271             if isinstance(applied,list):
  
  /home/app/anaconda/lib/python2.7/site-packages/pandas/core/internals.pyc in diff(self, n)
      423     def diff(self, n):
      424         """ return block for the diff of the values """
  --&gt; 425         new_values = com.diff(self.values, n, axis=1)
      426         return make_block(new_values, self.items, self.ref_items, fastpath=True)
      427 
  
  /home/app/anaconda/lib/python2.7/site-packages/pandas/core/common.pyc in diff(arr, n, axis)
      643     if arr.ndim == 2 and arr.dtype.name in _diff_special:
      644         f = _diff_special[arr.dtype.name]
  --&gt; 645         f(arr, out_arr, n, axis)
      646     else:
      647         res_indexer = [slice(None)] * arr.ndim
  
  /home/app/anaconda/lib/python2.7/site-packages/pandas/algos.so in pandas.algos.diff_2d_int16 (pandas/algos.c:91446)()
  
  ValueError: Buffer dtype mismatch, expected 'float32_t' but got 'double'
  </code></pre>