title: How to map a function using multiple columns in pandas?
body: <p>I've checked out map, apply, mapapply, and combine, but can't seem to find a simple way of doing the following:</p>
  
  <p>I have a dataframe with 10 columns. I need to pass three of them into a function that takes scalars and returns a scalar ...</p>
  
  <pre><code>some_func(int a, int b, int c) returns int d
  </code></pre>
  
  <p>I want to apply this and create a new column in the dataframe with the result.</p>
  
  <pre><code>df['d'] = some_func(a = df['a'], b = df['b'], c = df['c'])
  </code></pre>
  
  <p>All the solutions that I've found seem to suggest to rewrite some_func to work with Series instead of scalars, but this is not possible as it is part of another package. How do I elegantly do the above?</p>