title: Pandas passing arguments to apply
body: <p>I'm trying to apply a function to a dataframe, creating a new column as a result, like so:</p>
  <pre><code>def defensive_weights(DSp=None,SGp=None,FCp=None):
      if dfcrop['opp_goals'] == 0:
          DInd = (DSp*2 + SGp + FCp)
      else:
          DInd = (DSp + SGp + FCp)
  
      return DInd
     
  dfcrop['IED'] = dfcrop['opp_goals'].apply(defensive_weights, DSp=DSp,SGp=SGp,FCp=FCp)
  </code></pre>
  <p>I'm getting:</p>
  <pre><code>TypeError: defensive_weights() got multiple values for argument 'DSp'
  </code></pre>
  <p>What am I missing?</p>