title: Apply function to pandas column having other column as argument
body: <p>Hey I am trying to apply a function to a column <strong>x</strong> using <strong>y as parameter</strong>, so for every row I want to apply <strong>x</strong> to <strong>y</strong>, something like this:</p>
  
  <pre><code>def fun(x, y):
      return x + y
  
  
  
  df['xy'] = df['x'].apply(fun, args = df['y'])
  </code></pre>
  
  <p>But it does not work.
  Any ideas?
  Note that my real function is not as simple as adding two values</p>